RE: when evaluated not=""

Subject: RE: when evaluated not=""
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Fri, 8 Sep 2000 13:41:43 +0100
Eric,
Try

<xsl:when language="JavaScript"
expr="getDirectory(this.getAttribute('page')) != ''">

language="JavaScript" isn't really needed as it defaults to ECMA 262

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Eric Taylor
>Sent: 08 September 2000 12:45
>To: 'XSL-List@xxxxxxxxxxxxxxxx'
>Subject: xsl:when evaluated not=""
>
>
>Part of my XSL looks like this:
>
>        <xsl:choose>
>          <xsl:when *** stuck here ***>
>            <A>
>              <xsl:attribute
>name="href"><xsl:eval>getDirectory(this.getAttribute('page'))</xsl:
>eval></xs
>l:attribute>
>              <xsl:attribute name="target">new_window</xsl:attribute>
>              <xsl:value-of select="@text"/>
>            </A>
>          </xsl:when>
>          <xsl:otherwise>
>            <xsl:value-of select="@text"/>
>          </xsl:otherwise>
>        </xsl:choose>
>
>I only want the "when" to happen if
><xsl:eval>getDirectory(this.getAttribute('page'))</xsl:eval> returns some
>value (that is, if it returns a blank value, I want to do the "otherwise").
>I don't know the syntax for this.  Thanks.  Eric
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread