RE: Pattern for attribute matching

Subject: RE: Pattern for attribute matching
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 2 Aug 1999 11:19:06 +0100
> But suppose I want to match a `bar' attribute that's attached 
> to a `foo' element.  My first guess would be
> 
>   match="foo/@bar"
> 
> But that doesn't seem entirely right because attributes are 
> not children of element nodes, but rather associated with element nodes. 

Your first guess is quite correct. "/" is used with all axes, not just the
child axis; and @bar is shorthand for attribute::bar. So "foo/@bar" means
find the nodes named foo, then find the nodes named bar by following the
attribute axis.

Mike Kay  


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


Current Thread