[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Finding immediately preceding node.

Subject: RE: Finding immediately preceding node.
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Mon, 2 Jun 2003 14:30:11 -0500
xsl immediately preceding sibling
G. Ken Holman wrote:
> Betty Harvey wrote:
> At 2003-06-02 09:56 -0400, Betty Harvey wrote:
> >I want to get the a true when I am inside <b name="cde"> and
> >the preceding <b> contains the attribute 'name="abc"'.
> 
>      <xsl:if test="preceding-sibling::b[@name='abc']">

Then Betty wrote:
> 	I am taking Ken's advice and rewriting
> the XSLT to use <xsl:for-each> but I am still 
> having difficulty finding the immediately preceding-sibling.
> Now it is always giving a true because there is a qualifying
> sibling in the tree.

I think Ken means

      <xsl:if test="preceding-sibling::b[1][@name='abc']">
                                        ^^^
This would solve the problem that Betty encountered.

Lars


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.