|
Subject: MSIE: testing attribute values From: Chris Maden <crism@xxxxxxxxxxx> Date: Wed, 16 Dec 1998 12:11:00 -0500 (EST) |
Has anyone successfully used <xsl:if> in MSIE 5b2 to test whether an
attribute has a specific value? The MS documentation states that the
match attribute takes "a subset of the XSL Pattern Match Syntax", but
does not give details. Here's what I've found:
<xsl:if match="."> works.
<xsl:if match="./child"> doesn't work.
<xsl:if match="*[0]"> works.
<xsl:if test="@attribute"> doesn't work. (I don't know where
"test" came from; it's one of the
two examples provided in the MS
doc.)
<xsl:if match="ancestor(elmtype)"> works.
<xsl:if match="ancestor(elmtype/child)">
is true whether or not child is
there, and even if child is not an
ancestor of the current node
(counter to the doc).
<xsl:if match="ancestor(elmtype[child])">
is true whether or not child
exists.
<xsl:if match="ancestor(elmtype[@attribute]")>
is always true, which is strictly
correct since attribute has a
default value specified in the
DTD.
<xsl:if match="ancestor(elmtype[@attribute='false'])">
is always true, even for elements
on which attribute is explicitly
specified as "true".
<xsl:if match="ancestor(elmtype)/@attribute">
is always false, even for elements
on which attribute has an explicit
value.
Can anyone help me puzzle this out?
-Chris
--
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: < in <xsl:eval>, Guy_Murphy | Thread | Re: MSIE: testing attribute values, James Clark |
| Re: < in <xsl:eval>, Chris Maden | Date | Re: < in <xsl:eval>, Guy_Murphy |
| Month |