I have not test it, but you could try to exclude the default namespace adding #default in the exclude list like this:
exclude-result-prefixes="h
EC.
Main Topics
Browse All TopicsI have the following XHTML:
<html xmlns:v="urn:schemas-micro
<head>
<title />
<title>Corporate Profile</title>
</head>
<body lang="EN-US" link="blue" vlink="purple" w2x:class="w2x_style_10000
...
</body>
</html>
That is generated from software we have that converts Word to XML. I have written a custom XSLT to add the XML processing instruction, but I cannot find a way of removing the XHTML namespace. Here is my XSLT:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.o
xmlns:h="http://www.w3.org
exclude-result-prefixes="h
<xsl:output method="xml" encoding="iso-8859-1" indent="yes"
omit-xml-declaration="no" />
<xsl:template match="h:html">
<doc>
<xsl:copy-of select="*" />
</doc>
</xsl:template>
</xsl:stylesheet>
The output I get is:
<?xml version="1.0" encoding="utf-8" ?>
<doc>
<head xmlns:v="urn:schemas-micro
<title />
<title>Corporate Profile</title>
</head>
<body lang="EN-US" link="blue" vlink="purple" xp_0:class="w2x_style_1000
I need to get rid of the xmlns="http://www.w3.org/1
XML Dude
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The problem is that the XSL namespace fixup is very strict about setting such things. The "exclude-result" operation only supresses effectively unused namespace declarations on output. Other than matching each occurence, I see no way of getting rid of it.
One minor point, you specify an output encoding of iso-8859-1 but you have got utf-8. Is that correct?
This is output from some very cool software we use called "W2XML" - we use it to convert our Word docs to XML. It has some other XSLTs to convert the output to other types of XML, (such as Docbook), but I was trying to keep the standard output and just put an XML processing instruction at the top (the standard output is XHTML from this software) - trying to create my own XSLT to use with the software.
There is indentation, but I am not sure it is a result of MSXML or not. MSXML is not a requirement of the software, but it does require the .NET Framework, which I think inherently uses MSXML.
DocSoft! And the transform (Adds XML processing instruction and removes HTML wrapper from standard output) from xmldudeus. And of course uses the MS XML object.
They actually say on their web site that namespaces should be removed manually, however I think you are going to have to match every "html" node and make a new one. At least you can upload the transform to the DocSoft web site for everybody else!
Business Accounts
Answer for Membership
by: BigRatPosted on 2003-03-04 at 05:16:29ID: 8064021
The problem is the xsl:copy-of instruction. Try adding the attribute copy-namespaces = "no". You may find however that namespace fixup causes them to reappear. If this is the case you are going to have to match every element in the source tree and create a new element in the output tree.