I have the following XHTML:
<html xmlns:v="urn:schemas-micro
soft-com:v
ml" xmlns:o="urn:schemas-micro
soft-com:o
ffice:offi
ce" xmlns:w="urn:schemas-micro
soft-com:o
ffice:word
" xmlns:st1="urn:schemas-mic
rosoft-com
:office:sm
arttags" xmlns="
http://www.w3.org/1999/xhtml"
w2x:generator-version="1.0
" xmlns:w2x="urn:schemas-doc
soft-com:w
ord-to-xml
:extension
s">
<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.org/1999/XSL/Transform"
xmlns:h="
http://www.w3.org/1999/xhtml"
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
soft-com:v
ml" xmlns:o="urn:schemas-micro
soft-com:o
ffice:offi
ce" xmlns:w="urn:schemas-micro
soft-com:o
ffice:word
" xmlns:st1="urn:schemas-mic
rosoft-com
:office:sm
arttags" xmlns="
http://www.w3.org/1999/xhtml"
>
<title />
<title>Corporate Profile</title>
</head>
<body lang="EN-US" link="blue" vlink="purple" xp_0:class="w2x_style_1000
0" xmlns:xp_0="urn:schemas-do
csoft-com:
word-to-xm
l:extensio
ns" xmlns:v="urn:schemas-micro
soft-com:v
ml" xmlns:o="urn:schemas-micro
soft-com:o
ffice:offi
ce" xmlns:w="urn:schemas-micro
soft-com:o
ffice:word
" xmlns:st1="urn:schemas-mic
rosoft-com
:office:sm
arttags" xmlns="
http://www.w3.org/1999/xhtml"
>
I need to get rid of the xmlns="
http://www.w3.org/1999/xhtml"
namespace. Please help.
XML Dude