This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl:when problem
- To: xsl-list at mulberrytech dot com
- Subject: Re: xsl:when problem
- From: Gilles Durys <Gilles dot Durys at nefy dot ucl dot ac dot be>
- Date: Fri, 18 Aug 2000 16:00:37 +0200
- References: <DBF5834E2987D311A4BE0060081D992C2C3E68@BUR2>
- Reply-To: xsl-list at mulberrytech dot com
Eric Taylor wrote:
>
> <xsl:template match="link">
> <xsl:if test="@internal">
> <xsl:when test= ".[@internal = //bookmark/@name]">
> <A>
> <xsl:attribute name="href">#<xsl:value-of select="@internal"
> /></xsl:attribute>
> <xsl:value-of select="@text"/>
> </A>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="@text"/>
> </xsl:otherwise>
> </xsl:if>
> </xsl:template>
>
> when I try to open a file that uses this stylesheet with IE5, I get the
> error "Keyword xsl:when may not be used here" Anyone know why?. (I am
> still using old microsoft namespace
> (xmlns:xsl="http://www.w3.org/TR/WD-xsl")--not sure if this is a factor,
> though I know it's contributed to some of the other issues I haven't been
> able to get to work). Thanks once again. Eric
The correct syntax is:
<xsl:choose>
<xsl:when test="...">
...
</xsl:when>
<xsl:when test="...">
...
</xsl:when>
...
<xsl:otherwise>
...
</xsl:otherwise>
</xsl:choose>
I hopt that helps.
Regards
--
Gilles Durys
Gilles.Durys@nefy.ucl.ac.be
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list