[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Removing duplicates from a branch
I want to suppress elements that are copies of any earlier in the document -- but only where they are in the same branch: Using the following fragment: <Request> <Case Category="1"> <ci>A</ci> <ci>B</ci> </Case> <Case Category="2"> <ci>A</ci> <ci>C</ci> <ci>C</ci> </Case> </Request> I want: A and B from Case 1 and A and C (only one C) from case 2 Using something like <xsl:apply-templates select=".//ci[not(.=preceding::ci)]"> I get: A and B from Case 1 and only one C from case 2 (but I still want the A from Case 2). I can't seem to find any way of restricting the scope of "preceding" to a particular branch. Does anyone have any ideas? Thanks John Geering John Geering ? 04 460 4972 ? PO Box 10254 Wellington mailto:John.Geering@xxxxxxxxxxxxxxx This message contains information that is confidential and which may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately by facsimile or telephone (call us collect) and return the original message to us by mail. Thank you. 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
|