[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

xsl:when, using AND


Subject: xsl:when, using AND
From: "Russ Holmes" <rholmes@xxxxxxxxx>
Date: Sun, 20 Aug 2000 16:27:00 +1200

I have an XML doc with two nodes defining whether data is shown as just
text, or as a link;

F128 indicates text, F129 indicates a link.  The possible combinations are;

<F128>1</F128>  -show text
<F129></F129>

<F128>1</F128>  -show link
<F129>1</F129>

<F128></F128>  -show link
<F129>1</F129>

<F128></F128>  -show nothing
<F129></F129>

My xsl reads as;

..
<xsl:choose>
<xsl:when test="((//CUSTOM/F128[. = '1']) $and$ (//CUSTOM/F129[. $ne$
'1']))">
<TR>
<TD align="left" colSpan="2"><B><xsl:value-of select="//ANode"/></B> </TD>
<TD align="right" colSpan="2"><xsl:apply-templates select="//ANode"/></TD>
<TD align="right"><xsl:apply-templates select="//ANode"/></TD>
<TD align="right"><xsl:apply-templates select="//ANode"/></TD></TR>
</xsl:when>
<xsl:when test="//CUSTOM/F129[. = '1']">
<TR>
<TD align="left"  colSpan="2"><B><xsl:value-of select="//ANode"/></B> </TD>
<TD align="right" colSpan="2"><A href=""><xsl:apply-templates
select="//ANode"/></A></TD>
<TD align="right"><A href=""><xsl:apply-templates
select="//ANode"/></A></TD>
<TD align="right"><A href=""><xsl:apply-templates
select="//ANode"/></A></TD></TR>
</xsl:when>
</xsl:choose>
..

but I get 'Unspecified error..' - useful!?

Grateful of any tips

Russ




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords