I'm transfering one xml to another using xslt.
My transfer.xsl file is something like this:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl
utput method="xml" standalone="yes" indent="yes"/>
<xsl:template match="source_root">
<xsl:element name="target_root">
<xsl:attribute name="xmlns:xsi">
http://www.w3.org/2001/XMLSchema-instance</xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
...
When I used Xalan-Java2.5.1 to do the transferformation, I got the following error:
file:///C:/xsl/transfer.xsl; Line #0; Column #0; Could not resolve namespace prefix: xmlns. The node will be ignored.
And there was no namespace prefix definition (xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance") was shown in the <target_root> element.
Can someone help on this? Thanks.