xsl-list
[Top] [All Lists]

Re: [xsl] Navigation / node-set

2008-05-14 10:39:41
Hi Mike,

On 5/14/08, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
You basically need to collapse the "matching" condition into a predicate so
you can say

<xsl:for-each select="preceding-sibling::*[PRED][1]">

Would we really require a for-each loop when only one element is
required to be processed.

We can just directly process, say preceding-sibling::*[PRED][1] or
perhaps store the element node in a variable (as below) and later use
it.

<xsl:variable name="x" select="preceding-sibling::*[PRED][1]" />


-- 
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>