[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Help to construct a loop
Hi Henry,
Without seeing your source and how your $myString is formed, this is rather hard to answer. Nor have you told us what XSLT version you have. In XSLT 1.0, dissecting a string is done using a recursive template ("saving" to a variable is not possible in XSLT). In XSLT 2.0, dissecting a string is much easier, i.e. by using tokenize(), replace() or xsl:analyze-string. Some XSLT 1.0 processors however allow the use of the EXSLT extensions, see http://exslt.org for how to use them. Note that XSLT is a declarative language which makes "traditional" approaches (while loop, assigning to a variable) not possible. If the string you've put into $myString comes from nodes (elements, attributes etc), it is probably easier to construct the output you want during the process, instead of after the $myString construction (in fact, constructing how the output should look like is all you do with XSLT, in general). Cheers, -- Abel Braaksma henry human wrote: Hi I will to build a loop (for-each or while, etc)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|