Subject: [xsl] Maybe newbie... From: Antonio Fiol <fiol@xxxxxxxxxx> Date: Fri, 17 May 2002 15:42:11 +0200 |
<xsl:template match="alarmhistory"> <table border="1" cellspacing="0" cellpadding="3"> <tr> <th bgcolor="#6699CC"><font color="#FFFFFF">D?but</font></th> <th bgcolor="#6699CC"><font color="#FFFFFF">Fin</font></th> <th bgcolor="#6699CC"><font color="#FFFFFF">Quantit?</font></th> <th bgcolor="#6699CC"><font color="#FFFFFF">Type de probl?me</font></th> </tr> <xsl:for-each select="alarm"> <xsl:for-each select="problemtype"> <tr> <xsl:choose> <xsl:when test="position()=1"> <td><xsl:value-of select="../@start" /></td> <td><xsl:value-of select="../@end" /></td> </xsl:when> <xsl:otherwise> <td></td><td></td> </xsl:otherwise> </xsl:choose> <td><xsl:value-of select="@qty" /></td> <td><xsl:value-of select="@type" /></td> </tr> </xsl:for-each> </xsl:for-each> </table> </xsl:template>
Which, when applied to the following part of a document: <alarmhistory> <alarm start="2002-01-01" end="2002-02-01"> <problemtype qty="3" type="10"/> <problemtype qty="4" type="6"/> </alarm> <alarm start="2002-03-01" end="2002-04-01"> <problemtype qty="1" type="3"/> <problemtype qty="2" type="4"/> </alarm> </alarmhistory>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] some help with xsl:if, Stuart Celarier | Thread | Re: [xsl] Maybe newbie..., Jeni Tennison |
[xsl] some help with xsl:if, Gabriel C Millerd | Date | [xsl] Syntax Assistance Needed, Scott Purcell |
Month |