[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: MSIE: testing attribute values
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|