XSLT fails when the XML file contains this top-level declaration:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <P2Main xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-Professional-Plug-in
2:ClipMetadata:v3.0"> <ClipName>0001FM</ClipName> </P2Main>
However, XSLT succeeds when I modify the XML declaration to this:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <P2Main> <ClipName>0001FM</ClipName> </P2Main>
What is the declaration conflict here, and why would that simple deletion make it work?
By the way, the XSL is
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:value-of select="P2Main/ClipName"/> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <P2Main xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-Professional-Plug-in
However, XSLT succeeds when I modify the XML declaration to this:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <P2Main> <ClipName>0001FM</ClipName> </P2Main>
What is the declaration conflict here, and why would that simple deletion make it work?
By the way, the XSL is
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:value-of select="P2Main/ClipName"/> </xsl:template> </xsl:stylesheet>