|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: simple conditional looping
> Mukul, Chris and Andrew thank you very much for prompt help.
> I implemented
> recursive template and it works fine.
>
> Andrew, I am using msxsl processor, is there any work-around
> for it similar
> to Saxon?
> p.s. portability is important.
Well yes there is, it's sometimes known as the 'Piez method' after
Wendell Piez on this list, but it's more of hack than a solution (which
Wendell will be the first to tell you :)
If you have more elements in your source than you need for your
iteration, then you can use:
<xsl:for-each select="//*[position() < 50]">
...
</xsl:for-each>
This simply selects all elements in the document and iterates over them.
If you want to 'loop' 50 times, then simply iterate over 50 elements.
If you don't have 50 elements in your source then you won't be able to
iterate 50 times...
In your particular case I would stick with the recursive template
solution.
Cheers
andrew
|
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








