This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: conditional processing <xsl: when test ...>
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] conditional processing <xsl: when test ...>
- From: Jarno dot Elovirta at nokia dot com
- Date: Wed, 29 Aug 2001 06:19:43 +0300
- Reply-To: xsl-list at lists dot mulberrytech dot com
> <xsl:choose>
> <!-- use EXACT if SqlExpression has an "=" sign" -->
> <xsl:when test="//SqlExpression/@where=attribute(=)">
> <EXACT value="9">
> </xsl:when>
>
> <!-- otherwise -->
> <!-- use RANGE if SqlExpression has an "<" or ">" sign -->
> <xsl:when test="//SqlExpression/@where=attribute(< | >)">
> <RANGE lower="9" upper="200" > <!-- I will have to do
> something here in order to be accurate about the actual
> range, since the
> ">" sign is used, as opposed to ">=" ...)
> </xsl:when>
>
> </EXACT>
>
> </RANGE>
> </xsl:choose>
>
>
> Am I using the "=attribute()" correct? Am I on the right track?
No. The test should be
<xsl:when test="//SqlExpression/@where[contains(.,'=')]">
and the second one
<xsl:when test="//SqlExpression/@where[contains(.,'<') or
contains(.,'>')]">
Jarno
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list