This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: accessing info outside current context
[David Carlisle]>
> > I just tried it out and you DO have to escape the ampersand
>
> but you missed the point of the argument. (Actually the real point was
> to protect the honour if a certain Lady) but the claimed technical
> argument was one of terminology.
>
> In XPath the less than operator is < and the test for a variable being
> less than three is $x < 3. (Check the XPath grammar to see this)
> Now _if_ you put your XPath in an XML file, then like any other text
> you have to quote the < hence the XSLT construct:
> <xsl:if test=" $x < 3">
>
> So Jeni's example was correct as an XPath: it matches a production in
> the XPath grammar. But you have to quote & in XML files. So if you were
> to write that XPath in an XSLT stylesheet you would have to quote it.
>
Sure, I know that, but the original question seemed to be about using it in
xslt, and I couldn't tell from the posts whether that question was being
answered or not. So I decided to be very clear about it.
Cheers,
Tom P
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list