posted 18 years ago
Hi,
I have an XML document that I transform which has a default namespace. For example:
<root xmlns="http://www.helloworld.com">
</root>
In order for my XSL stylesheet to work with this, I need to specify the following:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:test="http://www.helloworld.com">
<xsl:template match="test:root">
</xsl:template>
</xsl:stylesheet>
That all works fine and well, no problems. I now have a near identical XML file that has to be transformed into the same structure. The only difference is that it doesn't contain the default namespace such as my first file example:
<root>
</root>
I am trying to apply the same stylesheet and it is unable to identify any matches in the second file. Is there anyway of making the XSL file compatible with both types of input XML file?
Hope that makes sense,
Thanks,
Stuart
SCJP (Java 2)<br />SCJD<br />SCWCD