Why is the following not valid xml?

7331

New Member
Why does the following not work as I'd expect it to? \[code\]<root xmlns:ns0="xmlns" ns0:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="xsi" ns1:schemaLocation="[some schema location]" />\[/code\]Basically, I'm trying to add schemaLocation to an xml file that doesn't have this by doing :- \[code\]<xsl:template match="/s:*"> <xsl:element name="{local-name()}" namespace="some other namespace"> <xsl:attribute namespace="xmlns" name="xsi">http://www.w3.org/2001/XMLSchema-instance</xsl:attribute> <xsl:attribute namespace="xsi" name="schemaLocation">[some-loc]</xsl-attribute> <xsl:apply-templates select="@*|node()"/> </xsl:element></xsl:template>\[/code\]and Xalan-C gives the xml shown above.
 
Back
Top