I have created an XML file and transformed it into HTML using xsl. However, when I add a target namespace to the XML file, my browser does not process the file correctly. When I remove the target namespace, it works fine.
The XML is as follows:
<root xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://xml.netbeans.org/schema/XmlSchema'
xsi:schemaLocation='http://xml.netbeans.org/schema/XmlSchema XmlSchema.xsd'>
When the line xmlns='http://xml.netbeans.org/schema/XmlSchema' is present in the XML, the browser does not process it correctly. When this line is removed, it works correctly. What is the problem?
The problem appears to be that you do not handle the
http://xml.netbeans.org/schema/XmlSchemanamespace in your XSLT file.I guess… it’s a shame that I have to guess – how do you think someone can tell you where the problem is whith your code when you do not show your code?
So, I guess you have something like this:
where you should have
Not the namespace handling. Adapt your XSLT accordingly.