RE: [xsl] Getting attribute from rootnode...?

Subject: RE: [xsl] Getting attribute from rootnode...?
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 16 Nov 2001 10:35:38 -0000
> Does what your mail say, imply that /*/@RootAttributeValue
> actually searches
> through every 3 child nodes (in your example) looking for the
> attribute?

"/*" selects all the ELEMENT children of the root node (in a well-formed
document there will be exactly one), and the next step "/@att" looks among
the attributes of that element. If you wrote /node()/@RootAttributeValue you
would get the same answer, but the processor would then have to look for
attributes of comments and processing instructions as well, unless it was
clever enough to notice in advance that such things can't exist.

Of course the actual algorithm is up to the processor, if it wanted to it
could search all the attributes in the document and test which of them
belonged to the document element.... but it's unlikely.

Mike Kay
>


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


Current Thread