Subject: Re: Length of a variable? From: nigel.byrnes@xxxxxxxxxxx Date: Wed, 15 Mar 2000 19:45:04 +0100 |
Problem solved from reading http://www.xmlsoftware.com/articles/xsl-by-example.html: <xsl:if test="not(boolean($colours))">...</xsl:if> Nigel Hi all Considering a the following xml code: <paint> <colour>red</colour> <colour>yellow</colour> </paint> it is possible to set the variable colours to contain both colour elements as follows: <xsl:variable name="colours" select="colour"/> Further on in the stylesheet, there is to be a branch on whether $colours contains any colur elements or not. I have tried the following expressions without any success: <xsl:if test="$colours[last()=0]">...</xsl:if> <xsl:if test="$colours=''">...</xsl:if> Does anyone have any ideas? Thanks Nigel Nigel Byrnes, Philips Research Cross Oak Lane, Redhill. Surrey, RH1 5HA Voice: +44 (0) 1293 815578 Fax: +44 (0) 1293 815500 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Length of a variable?, Steve Tinney | Thread | Re: Length of a variable?, barrys |
Re: The XSL-List Digest V2 #549, nigel . byrnes | Date | Re: MSXML abominations happening fo, David Halsted |
Month |