|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Generate N elements
Dave Pawsons XSLT FAQ has useful examples of this.
http://www.dpawson.co.uk/xsl/sect2/sect21.html There are two main approaches: - Repetiton - using recursive templates - a neat approach Jeni Tennison pointed out by selecting document nodes in the XSLT stylesheet and using position() to limit the number This can be used in a for-each loop e.g. <xsl:variable name='thisdoc' select='.'/> <xsl:for-each select='document("")//*[position() <= $num_times]'> <!-- use $thisdoc if you want to access main document nodes --> <!-- do whatever you want --> </xsl:for-each> Kenny Bogoe (BogoeMD) wrote: Hi,
/ tel :0208-239-6810 mob: 0794-725-9760 email: mike.trotman@xxxxxxxxxxxxx UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 /
|
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








