This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: accessing info outside current context



> 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 &lt; 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.

this is exactly the same as the situation for url's the URL has an
unquoted & but you have to write it as &amp; if you write the URL in an
XML or HTML file.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]