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

AW: Finding immediately preceding node.

Subject: AW: Finding immediately preceding node.
From: Markus Abt <abt@xxxxxxxx>
Date: Mon, 2 Jun 2003 21:13:08 +0200
markus immediately
No, it looks like it should not work.

As i wrote before, the correct test expression would be:
<xsl:if test="parent::b[@name='cde']/preceding-sibling::b[1]/@name='abc'">

parent::b is not the same as ../b:
../b goes to the parent (=b) and from there to some child element b which does not exist.

Markus

__________________________
Markus Abt
Comet Computer GmbH
Rueckertstrasse 5
80336 Muenchen
GERMANY
Phone +49 89 5445 6045
Fax +49 89 5445 6046
http://www.comet.de
mailto:abt@xxxxxxxx



----------
Von: 	Lars Huttar
Gesendet: 	Montag, 2. Juni 2003 20:33
An: 	xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: 	RE:  Finding immediately preceding node.


Betty, I can't see why not.
Your test expression,

  <xsl:if test="../b[@name='cde']/preceding-sibling::b[1]/@name='abc'">

looks like it should work, assuming that the context node
is a child of <b>, e.g. if it's in a template that matches "c" elements.

Maybe if you showed more of your xslt code we could see why you're
never getting a 'true'.

Lars


 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

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.