This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: when evaluated not=""
- To: "'XSL-List at mulberrytech dot com'" <XSL-List at mulberrytech dot com>
- Subject: RE: when evaluated not=""
- From: Eric Taylor <Eric dot Taylor at RealPage dot com>
- Date: Fri, 8 Sep 2000 12:36:15 -0500
- Reply-To: xsl-list at mulberrytech dot com
GREAT SOLUTION (AS USUAL) CHRIS. WORKED. EKT
______________________________
From: "Chris Bayes" <Chris@Bayes.co.uk>
Subject: RE: when evaluated not=""
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-----
>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").
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list