RE: How to get an apostrophe into a test expression

Subject: RE: How to get an apostrophe into a test expression
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 12 Oct 1999 18:40:22 +0100
> 
>    <xsl:when test="substring($Nom,1,2) = 'l&apos;'">  
> 
> How can I refer to a quote inside a quoted string inside 
> another quoted string?
> 
You have to remember that the entity reference gets expanded before the
XPath parser sees it. So you will need to use the opposite kind of quote
from the one XPath is using. Try

>    <xsl:when test='substring($Nom,1,2) = "l&apos;"'>

Mike Kay  


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


Current Thread