|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: extracting unique elements
At 04:46 AM 1/28/2000 , Kay Michael wrote: >> Is there any easy way to select only the unique elements from >> an xml document. > ><xsl:for-each select="//CUSTOMER[not(.=preceding::CUSTOMER)]"> ><xsl:value-of select="."/> ></xsl:for-each> Doesn't this require the CUSTOMER elements to be sorted? >> <SALESFORCE> >> <SALESPERSON NAME="BOB"> >> <CUSTOMER CODE="1">ACME</CUSTOMER> >> <CUSTOMER CODE="2">BLAMMO</CUSTOMER> >> </SALESPERSON> >> <SALESPERSON NAME="TODD"> >> <CUSTOMER CODE="1">ACME</CUSTOMER> >> <CUSTOMER CODE="3">KABLOOEY</CUSTOMER> >> </SALESPERSON> >> <SALESPERSON NAME="BETTY"> >> <CUSTOMER CODE="4">JUICY JUICY</CUSTOMER> >> <CUSTOMER CODE="2">BLAMMO</CUSTOMER> >> </SALESPERSON> >> </SALESFORCE> >> >> I would want to only display: >> >> ACME >> BLAMMO >> KABLOOEY >> JUICY JUICY James Garriss | The MITRE Corporation | jgarriss @ mitre.org 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
|

Cart








