xsl-list
[Top] [All Lists]

tokenize(), grouping problem

2005-04-22 15:07:48
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


--~------------------------------------------------------------------
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>