couldn't one get there with, say,
sequence-before(sequence, item+)
Not really. How would you do "return the subsequence of $S
before the first element that has @page='2'"?
Oh, I see now what you're suggesting: something based on comparing node
identity. Well, for a large class of problems that might work:
sequence-before($chapters, $chapters[(_at_)page='2'][1])
But it's clumsy, it conceptually involves scanning the sequence twice (and
therefore can't be streamed without some optimization); and it only works
for nodes (or works differently for atomics).
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
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>
--~--