xsl-list
[Top] [All Lists]

Re: [xsl] Tokenize comma separated string in XSL

2007-03-21 04:54:05
Lalit(_dot_)Chanchlani(_at_)iflexsolutions(_dot_)com wrote:
I am using XSLT 1.0 In the XSL I get the comma separated string
ABC,DEF,GHI as a parameter which is set by a Java program.
The output XML should be:

<AllCodes>
   <Code value = "A">
      <Description="ABC"/>

<snip />

This is almost a 100% copy of your original post, without any changes to your output XML (which still is *not* XML!). D-R-Y, it is not needed, we all read your previous posts.

Did you read my original reply? I suggested for XSLT 1 that you go for any of the many string-tokenize methods, like recursive applying a named template with substring-before/after etc. There are many suggestions in the FAQ. A general solution is here: http://www.exslt.org/str/functions/tokenize/index.html (go to XSLT Template link).

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