Ok in XSLT i often see:
<xsl:if test="a > b">
so what's the big deal with it?
I mean i changed it to <xsl:if test="a > b">
and its working fine.. why not just use this?
Ok in XSLT i often see:
<xsl:if test="a > b">
so what's the big deal with it?
I mean i changed it to <xsl:if test="a > b">
and its working fine.. why not just use this?
If this is really true, your so called "XSLT processor" wasn't one. Any XSLT stylesheet must be a well-formed XML document. Any well-formed XML document cannot contain the character
"<"
inside an attribute value.Therefore, please, correct the untrue statement in your question.
Nothing to do with XSLT, apart the fact that it's XML, and XML disallows
<
(but not>
) in attribute values:Because the <> are tag delimiters - therefore we need to escape this as an entity & l t ; or & # x 3 e ; as a sequence
XSLT files are XML files also; The XML Spec says not to use '<' and '&' literally except in certain contexts. So this is a matter of keeping well formed XML within your XSLT file.