Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Splitting string

From: "Michael Kay" <mhk@--------->
To:
Date: 8/2/2004 9:55:00 PM
Try a google for "recursive XSLT template to tokenize string".

There's a tokenize() function in XPath 2.0 which makes this dead easy; you
may also find that your XSLT 1.0 processor implements str:tokenize from the
EXSLT library at www.exslt.org. Otherwise you have to write a recursive
template that processes the string one word at a time: there are plenty of
examples of this in the textbooks.

Michael Kay

> -----Original Message-----
> From: Rui Alberto L. Gongalves [mailto:rui-l-goncalves@xxxxxxxxxxxxx]
> Sent: 02 August 2004 22:20
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Splitting string
>
> Hi all,
> I have a string like:
> /this/is/a/test
>
> and I need to create a template that will output:
> /this
> /this/is
> /this/is/a
> /this/is/a/test
>
> I think this is not so simple as it looks at first glance.
> Does anyone have an idea how to solve this problem?
> Thanks for any help.
>
> Rui
> --
> Rui Alberto L. Gongalves <rui-l-goncalves@xxxxxxxxxxxxx>
> PT Inovagco


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent