I don't know why, but whatever I try to write this string "<<" using XSLT, the parser gives me an error; I tried the same with writing greater_then symbol twice(">>") and it worked. These are the ways I tried to use:
1 - <xsl:text disable-output-escaping="yes"><<</xsl:text>
2 - <xsl:text disable-output-escaping="yes"><<</xsl:text>
3 - <xsl:text disable-output-escaping="yes"><&#lt;</xsl:text>
4 - <xsl:text disable-output-escaping="yes"><<</xsl:text>
5 - <xsl:text disable-output-escaping="yes">&#lt;</xsl:text><xsl:text disable-output-escaping="yes">&#lt;</xsl:text>
...none of them work. Does someone of you know why? Thank you in advance.
EDIT: I tried using many parser through internet, like on the websites: altervista; w3c. The error I get is: "XML: non well-formed"
Even trying this little xslt code, it gives me the same error:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/logs">
<html>
<body>
<<
</body>
</html>
</xsl:template>
</xsl:stylesheet>
But this works...:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/logs">
<html>
<body>
<
</body>
</html>
</xsl:template>
</xsl:stylesheet>
XSLT code is XML and within XML you need to escape any
<
less-than symbol not to be used as markup as<
and consequently two of them as<<
as you have done. In that case XML parsing and XSLT processing should work fine and does for me at http://xsltransform.net/bFDb2CP which simply has the inputthe XSLT code
and the result
If your test environment gives you an error on
<<
then it is broken and not a usable environment to learn, test, run or debug XSLT code.