Subject: Re: [xsl] xsl:variable with hex color values From: Rolando Isidoro <rli@xxxxxxxxxx> Date: Sun, 22 May 2005 16:59:50 +0100 |
Another solution to add to the list you've been given: In XSLT 2.0 you can do
<td bgcolor="{if (position() mod 2) then 'black' else 'white'}"> ... </td>
If you want to be terse and don't mind being obscure, you can write things in XSLT 1.0 like
<td bgcolor="#{substring('FFFFFF000000', (position() mod 2 * 6) + 1, 6)}"> ... </td>
Michael Kay
<?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/xsl" href="teste.xsl"?>
<tests> <test> 1 </test> <test> 2 </test> <test> 3 </test> <test> 4 </test> </tests>
<body> <table>
</body> </html>
</xsl:template> </xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xsl:variable with hex col, Williamson, Chris | Thread | RE: [xsl] xsl:variable with hex col, Michael Kay |
Re: [xsl] get Data BETWEEN FromDat, Mukul Gandhi | Date | RE: [xsl] xsl:variable with hex col, Michael Kay |
Month |