This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Filtering the nodes passed to a template...
- To: <XSL-List at mulberrytech dot com>
- Subject: Filtering the nodes passed to a template...
- From: "Callum Elliott" <c dot j dot elliott-96 at student dot lboro dot ac dot uk>
- Date: Thu, 30 Mar 2000 16:38:48 +1100
- Reply-To: xsl-list at mulberrytech dot com
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