[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: MSIE: testing attribute values

Subject: Re: MSIE: testing attribute values
From: James Clark <jjc@xxxxxxxxxx>
Date: Thu, 17 Dec 1998 07:38:10 +0700
xsl if match
I would guess you have to use

 match="*[@attribute]"

since they are interpreting the attribute as a match pattern rather than
as a select pattern as specified in the WD.

Chris Maden wrote:
> 
> 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



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.