[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: not-having-attribute


Subject: RE: not-having-attribute
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 28 Feb 2000 12:15:34 -0000

>Is it possible to get "all para nodes that do NOT 
> contain a type attribute OR nodes that contain a value not equal to
warning?"

Write: para[not(@type=warning)]

>From the note at the end of XPath section 5.3
> (http://www.w3.org/TR/1999/REC-xpath-19991116.html#attribute-nodes) I
gather
>that I need to use a validating XML parser if I want this to work at all.

No, this is not necessary if you code your stylesheet to handle absent
attribute values and treat absence in the same way as you treat the default
value.

Mike Kay


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



Current Thread
Keywords