|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how to seperate sequence?
Hi Thomas,
> How can I use e.g. a 'xsl:if test = "position() mod 2 == 0"'
> expression, or does anyone have a better way to do it?
That's almost it. You need to create a row for every odd para in your
content (the ones whose position() mod 2 is 1):
<xsl:for-each select="para[position() mod 2 = 1]">
<tr>
...
</tr>
</xsl:for-each>
Inside the row, the first cell holds the odd para element that you're
looking at, and the second cell holds that para element's immediately
following sibling:
<xsl:for-each select="para[position() mod 2 = 1]">
<tr>
<td><xsl:value-of select="." /></td>
<td><xsl:value-of select="following-sibling::para[1]" /></td>
</tr>
</xsl:for-each>
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








