RE: [xsl] how do you determine if a property exists?

Subject: RE: [xsl] how do you determine if a property exists?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 16 Apr 2004 12:11:07 +0100
>    <xsl:when test="@duration=''">1</xsl:when>
>    <xsl:when test="not(@duration)">1</xsl:when>
> 
> This second when clause will never be used, as someone has already
> commented, if there is no duration attribute, the first test will
> already be true.

No, @duration='' will be false if @duration doesn't exist.

But you can combine both tests by writing not(@duration!='').

Michael Kay

Current Thread