|
Subject: Re: [xsl]How can I choose to ouput different nodeElement.... From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 29 Dec 2001 18:51:59 -0500 |
there is something wrong with my XSL:
I know I can repeat the whole paragraph in both when and otherwise container.
<xsl:variable name="contents">
<td>
<xsl:value-of select="@id"/>
</td>
<td align="center">
<xsl:value-of select="."/>
</td>
<td align="center">
<xsl:value-of select="@num"/>
</td>
</xsl:variable>
...
<xsl:choose>
<xsl:when test="(@id mod 2)=0" >
<tr bgcolor="#ffffcc">
<xsl:copy-of select="$contents"/>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<xsl:copy-of select="$contents"/>
</tr>
</xsl:otherwise>
</xsl:choose><tr> <xsl:if test="(@id mod 2)=0"> <xsl:attribute name="bgcolor">#ffffcc</xsl:attribute> </xsl:if <td> <xsl:value-of select="@id"/> </td> <td align="center"> <xsl:value-of select="."/> </td> <td align="center"> <xsl:value-of select="@num"/> </td> </tr>
-- Training Blitz: 3-days XSLT/XPath, 2-days XSLFO - Feb 18-22, 2002
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-07-1 Practical Formatting Using XSLFO ISBN 0-13-065196-6 Definitive XSLT & XPath XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed), articles, training(instructor-live,Internet-live,web/CD,licensed) Next public training: 2002-01-10,01-11,01-16,01-18,02-11,02-12, - 02-13,02-15,02-18,02-21,03-11,03-14,03-15,03-18,03-19
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl]How can I choose to ouput diff, dragonjia | Thread | [xsl] Re: Assignment no, dynamic sc, Gunther Schadow |
| [xsl] RenderX, Antenna House Cost (, Betty Harvey | Date | Re: [xsl] Creating an input form, X, Robert Koberg |
| Month |