|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: looping over a string?
> I suspect I can define a chunk of xml inside the xsl, assigning it to a
> variable, and somehow apply templates to that?
>
The easiest way would then be to use this:
<xsl:variable name="Alphabet-as-RTF">
<Alphabet>
<Letter>A</Letter>
<Letter>B</Letter>
...
<Letter>Z</Letter>
</Alphabet>
</xsl:variable>
Depending on whether your processor supports xx:nodeset extension, you
can use either that, or you can use another variable, referencing the
first (David Carlisle has provided me with this solution in the past):
<xsl:varible name="Alphabet-as-nodeset"
select="document('')/xsl:stylesheet/xsl:variable[@name='Alphabet-as-RTF']"/>
Then you can reference this variable with an xsl:for-each or other
construct to iterate over the letters in the alphabet.
I hope this helps.
Regards,
Ragulf Pickaxe :-)
|
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
|

Cart








