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

Grouping immediate follow sibling

Subject: Grouping immediate follow sibling
From: "Paul Clarke" <pclarke@xxxxxxxxxxxxxxxx>
Date: Mon, 31 Jan 2005 12:44:35 -0000
follow sibling
Hello,

I receive XML similar to that shown below:
 
<bodyFrag>
	<p>title</p>
	<ProgAbs>some text</ProgAbs>
	<ProgAbs>More text</ProgAbs>
	<ProgAbs>Even more</ProgAbs>
	<p>Paragraph</p>
	<p>Beispiel:</p>
	<ProgAbs>some text</ProgAbs>
	<ProgAbs>More text</ProgAbs>
	<ProgAbs>Even more</ProgAbs>
</bodyFrag>

I need to process it as follows:

	1. When I see a <p> containing 'title', output it in some way. (I
can do this part).

	2, Select only the immediately following <ProgAbs> sibling elements.
I.e. the 3 ProgAbs elements with content immediately following the <p>
element selected in 1 above.

Using 'following-sibling::ProgAbs' gives me all the siblings of that name,
as it should. I just need to know how to construct an expression to select
only those <ProgAbs> that follow on immendiately after the <p> element.

Thanks		
		
Paul Clarke 
RCP Solutions Ltd. 
mailto:paul@xxxxxxxxxxxxxxxx 
http://www.rcpsolutions.com 
Office: +44 1344 886 351 
Mobile: +44 7973 767 558

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.