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

Re: xpath question

Subject: Re: xpath question
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 9 Jul 2003 15:41:47 +0100
xpath sibling element
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


Current Thread
  • Re: xpath question, (continued)
    • Jeni Tennison - Fri, 4 Jul 2003 07:27:53 -0400 (EDT)
    • abbouh - Wed, 9 Jul 2003 09:29:46 -0400 (EDT)
      • David Carlisle - Wed, 9 Jul 2003 09:50:03 -0400 (EDT)
        • abbouh - Wed, 9 Jul 2003 10:20:33 -0400 (EDT)
        • Jeni Tennison - Wed, 9 Jul 2003 10:41:56 -0400 (EDT) <=
        • abbouh - Wed, 9 Jul 2003 11:04:21 -0400 (EDT)
      • G. Ken Holman - Wed, 9 Jul 2003 10:21:18 -0400 (EDT)

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.