Subject: RE: [xsl] Another Alternate table-row background color question - Using filters From: "Aron Bock" <aronbock@xxxxxxxxxxx> Date: Mon, 30 May 2005 15:09:08 +0000 |
stylesheet will extract only some information (filter) from the XML and create a table. I want the rows in this table to have alternate background color. Because of the filter condition in the XSL, I cannot use the position() to check for odd/even rows. I need to (essentially) check the row number inserted into the HTML <TABLE>.
<xsl:variable name="r"> <xsl:copy-of select="Codes/Code[Name = 30 ... etc]"/> </xsl:variable>
<xsl:for-each select="node-set($r)"> //.. do something with . </xsl:for-each>
<Codes> <Code> <Name>10</Name> <Description>Decription 10</Description> </Code> <Code> <Name>20</Name> <Description> Description 20</Description> </Code> <Code> <Name>30</Name> <Description>description 30</Description> </Code> <Code> <Name>40</Name> <Description> Description 40</Description> </Code> </Codes>
And here is my stylesheet (it extracts only codes 30, 50 & 60). The output should contain the first and third rows in one bg color and the second row in a different color. I tried the position() in this XSL, but it does not work...
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Another Alternate table-row b, GNallan | Thread | RE: [xsl] Another Alternate table-r, Aron Bock |
RE: [xsl] Another Alternate table-r, Maria Amuchastegui | Date | RE: [xsl] Q - Parsing & Manipulatin, Michael Kay |
Month |