xsl-list
[Top] [All Lists]

Re: Selecting the first item from a tokenized string

2006-01-13 07:38:55

 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
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--