You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Matthew Richardson <ma...@oceanlake.com> on 2002/10/24 17:55:57 UTC

checking for null

heres a simple one...hopefully... 

im just trying to check if there is <a href> inside an <a href> which i got
a hand with yesturday, but i cant seem to successfully check for null
..atleast i assume that it would get a null back if there wasn't a <a> tag
inside the other...   I just end up with no links on the screen at all. 

<xsl:variable name="testlink" select="a[@href and parent::a[@href]]"/>
<xsl:if test="$testlink=null">

... i also tryed
 <xsl:if test="ancestor::a">
... but that gave me the same result

RE: checking for null

Posted by Florian Deissenboeck <fl...@deissenboeck.de>.
or: <xsl:if test="$testlink=''">

> -----Original Message-----
> From: Joseph Kesselman [mailto:keshlam@us.ibm.com]
> Sent: Donnerstag, 24. Oktober 2002 17:57
> To: 'xalan-j-users@xml.apache.org'
> Subject: Re: checking for null
> 
> 
> Try:    <xsl:if test="not($testlink)"> ?
> 
> ______________________________________
> Joe Kesselman  / IBM Research

Re: checking for null

Posted by Joseph Kesselman <ke...@us.ibm.com>.
Try:    <xsl:if test="not($testlink)"> ?

______________________________________
Joe Kesselman  / IBM Research