Subject: RE: if confusion
From: Ben Robb <Ben@xxxxxxxxxx>
Date: Tue, 21 Sep 1999 14:44:39 +0100
|
Your <xsl:when> should read:
<xsl:when test="../TYPE[.=1]">
Rgs,
Ben
> -----Original Message-----
> From: Sargeant, Richard (GEIS) [mailto:Richard.Sargeant@xxxxxxxxxxx]
> Sent: 21 September 1999 12:01
> To: xsl-list@mulberrytech. com (E-mail)
> Subject: xsl:if confusion
>
>
> Hi,
>
> While processing a node I need to do conditional
> processing based on the
> contents of another node of the same parent. For example my
> XML looks like
>
> <USER>
> <TYPE>1</TYPE>
> <PASSWORD>pwd</PASSWORD>
> </USER>
>
> The xsl for node password is
>
> <xsl:template match="PASSWORD">
> <td>
> <font face="arial" size="2">Password: </font>
> <font face="arial" size="2" color="#000080">
> <xsl:choose>
> <xsl:when test="../TYPE=1">########</xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="."/>
> </xsl:otherwise>
> </xsl:choose>
> </font>
> </td>
> </xsl:template>
>
> I've also tried ../TYPE/text()='1' but that also fails. What
> I'm I doing
> wrong ?
>
> regards
> Richard
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|