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

Filtering the nodes passed to a template...

Subject: Filtering the nodes passed to a template...
From: "Callum Elliott" <c.j.elliott-96@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Mar 2000 16:38:48 +1100
callum elliot
Hi,

I'm trying to pass certain (filtered) nodes to a template, using 'apply
templates'.  Normally I'd do

<apply-templates select="stuff[@things = gadgets]"/>

and that would do.  But this is more complicated...

My xml looks something like this

<report>
<payments>
	<payment id="..."/>
	<payment id="..."/>
</payments>
<paymentTypes>
	<paymentType paymentTypeRef="...">
	<paymentType paymentTypeRef="...">
</paymentTypes>
</report>

In the context of <report> I want to pass all the 'paymentTypes/paymentType'
nodes to a template, where @paymentTypeRef matches any @id attributes in
<payments>...phew!  In the template I'll be outputting the @paymentTypeRef
(amongst other things), but!!...I only want to output @paymentTypeRef if the
sibling node before it hasn't got the same value.

Any ideas??  I'd be very grateful.

Thanks,

Callum


 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.