This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Detecting presence of attributes
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] Detecting presence of attributes
- From: Peter Flynn <peter at silmaril dot ie>
- Date: Mon, 5 Feb 2001 22:21:48 +2400
- Reply-To: xsl-list at lists dot mulberrytech dot com
I'm having a problem with detection of the presence of attributes.
If I say
<xsl:if test="@foo=''"> then I would expect the condition to be true if
(a) the attribute foo was specified but the value was the null string
"", or
(b) the attribute foo was not specified at all.
xt does not appear to honor either. Is this a bug in xt, or have
I missed
some additional piece of syntax. What I want is the equivalent to
Omnimark's condition `when attribute foo is specified'.
A second problem arises with the position() function. In xt this appears
only to work within an <xsl:for-each> loop, not in a node group
instantiated by a match or select. Is this a bug or just my misreading?
///Peter
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list