Subject: [xsl] <xsl:choose> or variable syntax incorrect? From: "Kathy Burke" <Kathy_Burke@xxxxxxxxx> Date: Fri, 26 Sep 2003 13:42:01 -0400 |
Same problem...but perhaps not the variable name issue? I've used the current() syntax per Dimitri. Again, I'm trying to get a navy row if the when test < 1 count, otherwise red. My xml source has three <Station> elements, 2 have <Board> elements, 1 does not. However, all rows remain navy. Any other comments on where I could be gong astray with the following? Thanks again. Kathy <xsl:template match="Station"> <xsl:variable name="boards" select="//Station[current()/@name]/Boards/Board" /> <xsl:variable name="nboards" select="count($boards)" /> <xsl:choose> <xsl:when test="$nboards < 1"> <tr bgcolor="navy" valign="middle"> <td><xsl:value-of select="@name"/></td> </xsl:when> <xsl:otherwise> <tr bgcolor="red" valign="middle"> <td><xsl:value-of select="@name"/></td> </xsl:otherwise> </xsl:choose> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to match node set wit, S Woodside | Thread | [xsl] Re: <xsl:choose> or variable, Dimitre Novatchev |
RE: [xsl] Problems selecting the ri, Michael Kay | Date | [xsl] Re: <xsl:choose> or variable, Dimitre Novatchev |
Month |