• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 555
  • Last Modified:

Remove xmlns from html output

I know this has been asked a million times, but none of the ones i found on here worked for me...

This is the top of my stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
<xsl:output method="html" media-type="text/html"
      omit-xml-declaration="yes" />

This is the HTML output:
<h1 xmlns:php="http://php.net/xsl" xmlns:exslt="http://exslt.org/common">Row 1</h1>

How can i get it to remove xmlns:php="http://php.net/xsl" xmlns:exslt="http://exslt.org/common" from each node it writes?
1 Solution
Weiping DuSenior Web DeveloperCommented:
Add this attribute into your <xsl:stylesheet version=....>  element at 2nd line to see if it works or not:

exclude-result-prefixes="xsl php exslt"
qwertqAuthor Commented:
GAH! that was it.
i was seperating them with commas like i read online. i did not even try spaces. thganks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now