[Home] [By Thread] [By Date] [Recent Entries]
If you would refers it, and make it, say: ` node ( ) | @* ' the nodes would first be copied, resulting in the attributes ending up illegally: you may not create an attribute node after you create an element node in the result tree. However, I'm not sure if this is really enforced by the specs. This is not true. The order in which an <xsl:apply-templates> instruction is applied on the nodes selected by the expression as specified in its select attribute is not defined and may be in any order. What is important, is that the results of these applications are combined/ordered based on the document order of the processed nodes. In this case, attributes of an element are always preceding its children nodes -- therefore it doesn't matter how the union is written and the results of applying the selected matching templates will be first those of the attributes, then those of the children nodes -- these last themselves ordered according to the document order of the children nodes. In case the nodes specified in the select attribute belonged to more than one document, (which is not the case of the identity rule! but I am adding this for completeness) then the order of the results of processing two nodes from two different documents is undefined (implementation-specific), however the results of processing all selected nodes from the first document will *all* either precede or follow the results of processing all selected nodes from the second document. -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play On 10/31/06, Abel Braaksma <abel.online@xxxxxxxxx> wrote: Bill French wrote: > > I've used the identity transform many times to do useful things and > have often wondered about the match pattern. Why is the match pattern > > "node() | @*" > > rather than simply "node()"? Aren't attributes returned by node()?
|

Cart



