Subject: Re: [xsl] how to add a </tr> on every position() mod 4 = 0 ? From: "Thomas Sandor" <tsandor@xxxxxxxxxxx> Date: Mon, 11 Nov 2002 10:43:27 +0100 |
Hi, Thanks. Really thanks. Works for good! Cheers, Thomas ----- Original Message ----- From: <Jarno.Elovirta@xxxxxxxxx> Sent: Monday, November 11, 2002 10:11 Subject: RE: [xsl] how to add a </tr> on every position() mod 4 = 0 ? > Hi, > > Remember, you're not writing tags with XSLT, but rather building a tree (see <http://www.w3.org/TR/xpath#data-model>). Try something in the lines of > > <xsl:template match="foo"> > <table> > <xsl:for-each select="bar[position() mod 4 = 1]"> > <tr> > <xsl:apply-templates select=". | following-sibling::bar[position() < 4]" /> > </tr> > </xsl:for-each> > </table> > </xsl:template> > > Cheers, > > Jarno - Wumpscut: Wreath of Barbs (Album mix) > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] how to add a </tr> on eve, Jarno . Elovirta | Thread | [xsl] Xml data islands & xsl, Alan Flaherty |
RE: [xsl] "<" Gets Converted to "&l, Balajee Chandrasekar | Date | RE: [xsl] how to add a </tr> on eve, Michael Kay |
Month |