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

RE: XPath problem: Checking if imidiately preceding si

Subject: RE: XPath problem: Checking if imidiately preceding sibling is of acertain kind
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Fri, 27 Feb 2004 10:09:22 +0000
imidiately
Hi again,

I have tried with:

<xsl:when test="not(preceding-sibling::*[1]=preceding-sibling::A[1])">
Last sibling was not an A element -
</xsl:when>
<xsl:otherwise>
Last sibling was an A element -
</xsl:otherwise>

Which I thought would have worked, but it does not. It works well enough on the first problem (grouping consecutive A elements), but on the A elements with attributs a="5" and a="7", it says that the last element was an A element (why?).

<root>
 <X><A a="1"/><A a="1"/><A a="2"/>Some text</X>
 <X><A a="4"/>Some text<br/>
       <A a="5"/>More text<br/>
       <A a="7"/>Even more text</X>
</root>

Thanks, Ragulf Pickaxe :-|

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



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.