[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Filtering the nodes passed to a template...
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|