In 2.0 you can do
following-sibling::node[(_at_)hidden='0']
except
following-sibling::node[(_at_)hidden='1']/(.|following-sibling::node())
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Gabriel [mailto:gabriel(_dot_)klappenbach(_at_)gmail(_dot_)com]
Sent: 18 September 2005 16:17
To: XSL-list
Subject: [xsl] xpath selection problem
Hi.
On a document axis I have a list of nodes like this:
<node hidden=0>a</node>
<node hidden=1>b</node>
<node hidden=1>c</node>
<node hidden=0>d</node>
<node hidden=0>e</node>
<node hidden=0>f</node>
<node hidden=1>g</node>
<node hidden=1>h</node>
<node hidden=1>j</node>
<node hidden=0>k</node>
I want to select the group of consecutive nodes that have
hidden=1 after the
context node, that will have hidden=0. So the context node
will iterate over
the list of nodes that have hidden=0.
So if I were to output the contents of the selections, I
would first get
"bc" and then "ghj"
How can I express this in xpath without using recursion? Is
it possible
doing this without calling a template that uses recursion?
That is, I would
like to have an expression, something like
following-sibling::*[(_at_)hidden=1], but with the addition that
it excludes the
nodes in the other groups...
/Gabriel
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--