Re: [xsl] xpath question

Subject: Re: [xsl] xpath question
From: abbouh <abbouh@xxxxxxxxxxxxxxxxx>
Date: Wed, 09 Jul 2003 15:15:59 +0000
thanks

Jeni Tennison a écrit :

> Hi Abbouh,
>
> > you're right,but if i use /AAA/XXX/preceding-sibling::*
> > i will get BBB1 not  BBB2(what i want is BB2)
>
> The step preceding-sibling::* will get you *all* the preceding sibling
> elements of the context node. If you use <xsl:value-of> or something
> similar on this node-set, you will get the value of the first node in
> document order.
>
> If you only want the immediately preceding sibling element, you need
> to add a predicate that tests the position of the preceding sibling
> element; use:
>
>   preceding-sibling::*[1]
>
> Cheers,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread