Re: [xsl] Re: the nearest ancestor with the attribute

Subject: Re: [xsl] Re: the nearest ancestor with the attribute
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 18 Jan 2001 15:41:13 GMT

> 1. Some nodes will have attributes that were not explicitly expressed
> in the text of the xml document, but were defined/defaulted in a DTD.
> What will be the "document order" for @* in this case?

DTD implied attributes are no different from explicit ones.
The order is defined but implementation specific.

ie for a given element node . each time you do @*[2] in a run of the stylesheet
you get the same attribute node, as th eattributes (defaulted or not)
are placed in some order when the input tree is constructed.
But you can't guarantee you get the same result if you run the
stylesheet again. (Most likely you will if you use th esame input and
same XSL engine, but that is not guaranteed)

> 2. (//* | //@*)
> What is the "document order for the above node-set?

node sets don't have an order:-)

That set consists of all element and attribute nodes in the
source tree in no particular order.

That _source tree_ has a defined document order
(ie defined by the implementation, and fixed for a given run)

Note that document order _always_ refers to an input tree (either an
input document or a constructed tree from node-set) the order _never_
depends on which set of nodes is in the node set under consideration.


This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit

 XSL-List info and archive:

Current Thread