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

tokenize(), grouping problem

Subject: tokenize(), grouping problem
From: Jon Crump <jjcrump@xxxxxxxxxxxxxxxx>
Date: Fri, 22 Apr 2005 15:07:48 -0700 (PDT)
tokenize unique data
Once again, I know I'm missing something obvious. Could somebody wiser put me out of my misery?

If I have xml:

<data>
	<record>
		<subjects>subj1; subj2; subj3</subjects>
	</record>
	<record>
		<subjects>subj4; subj1; subj5</subjects>
	</record>
	<record>
		<subjects>subj3; subj6; subj5</subjects>
	</record>
</data>

and wish to obtain result:

<data>
	<subject>subj1</subject>
	<subject>subj2</subject>
	<subject>subj3</subject>
	<subject>subj4</subject>
	<subject>subj5</subject>
	<subject>subj6</subject>
</data>

I can use tokenize() to split the strings at the semicolon, but how can I then use the result in a for-each-group group-by procedure to output the unique values?

__________
J.J. Crump
Dept. of History 353560
University of Washington
Seattle, WA. 98195

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.