Subject: Re: [xsl] Selecting the first item from a tokenized string From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 13 Jan 2006 14:38:55 GMT |
> Please blame my poor english. your english is a lot better than my french... > Right? Yes. The expressions are normally equivalent because the "N" is normally a constant or a variable or some other expression that doesn't evaluate to different values in different places. In the case that people do go (...)[zzzz] and zzzz is actually a numeric-valued expression that has a different value for each item in the sequence, then it's almost always not what the user intended! For example my SEQ[number(N)] example. If anyone wrote that (except as an answer on xslt-list) they almost certainly meant to write SEQ[number(../N)] (ie they meant it to mean the same as the subsequence example, or equivalently, and more clearly write <xsl:variable name="n" select="number(N)"/>... select="SEQ[$n]"... as selecting all SEQ elements who's position in the initially selected sequence is numerically equal the string value of their N child, is just too weird. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Selecting the first item , Florent Georges | Thread | RE: [xsl] Selecting the first item , Michael Kay |
RE: Re: [xsl] XPath expression conf, cknell | Date | [xsl] applying one template to next, Alexander Stippler |
Month |