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

Re: Listing keywords

Subject: Re: Listing keywords
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 12 Jun 2006 11:42:12 +0100
idionm
> Anyone know how I can do this? I'm using XSL/XPath 1.0.

This is one problem where XPath2 makes it 10000 times easier:-)

It's possible in xslt1 you just need to write (or use, from a library
such as, probably, fxsl) a recursive template that splits the strings up
using substring-before() on the comma  and builds up the unique keyword
lists.

If you allow yourself some extension functions in 1.0 then the code
would be easier. especially if you have xx:node-set() to hand which
would allow you to do it in two phases, first splitting up the commans
then doing a standard xslt1 grouping idionm to find unique values.
If you also have an extension such as saxon:tokenize() you acan save
yourself a recursive tokenising template as well. If you have neither
eg you want it to run in mozilla, it's still possible, just a little
more involved.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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-2011 All Rights Reserved.