xsl-list
[Top] [All Lists]

Re: [xsl] Listing keywords

2006-06-12 03:58:48

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
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>