|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Struggling with tables
Hi Vic,
> <xsl:for-each select="item[position() mod 5 = 1]">
> <tr>
> <xsl:apply-templates
> select=".|following-sibling::item[position() < 5]"/>
> </tr>
> <xsl:for-each>
>
> My problem is the xml I've been given. The elements at this level
> all have different names, so how can I rephrase the above loop to
> work with this xml? Something like <xsl:apply-templates
> select=".|following-sibling::A1 or A2 or A3 or A4 (etc)[position() <
> 5]"/>
You *could* specify each of the names as follows:
. | following-sibling::*[self::A1 or self::A2 or self::A3 ...]
[position() < 5]
but probably you don't need to test the names at all; just use:
. | following-sibling::*[position() < 5]
(Note that you have to escape the < to < when you use this
expression within the XSLT.)
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








