|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Tables Again
How about the following. If you change 3 to some other "N"
value for the <xsl:variable> named "n" at the root, then
it should work for you for any n = 1 ... ?
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
<xsl:variable name="n">3</xsl:variable>
<xsl:template match="/">
<table border="1">
<xsl:apply-templates select="doc/data"/>
</table>
</xsl:template>
<xsl:template match="*[(position()-1) mod $n = 0]">
<tr>
<td>
<xsl:value-of select="@value"/>
</td>
<xsl:for-each select="from-following-siblings(*[not(position() > ( $n - 1
))])">
<td>
<xsl:value-of select="@value"/>
</td>
</xsl:for-each>
</tr>
</xsl:template>
</xsl:stylesheet>
____________________________________________________________
Steve Muench, Consulting Product Manager & XML Evangelist
Java Business Objects Dev't Team - http://www.oracle.com/xml
--- Begin Message ---
|
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








