RE: ORA-XS-323-Q: Prepending Nodes

> SECTION 5.6.1: Constructing Complex Content
> 
> Item 1:
> This subsection says that attribute nodes generated by 
> sequence constructor instructions are prepended to the result 
> sequence. Such a sequence reordering could lead in some cases 
> to serious performance degradation. Would not an acceptable 
> alternative be to say that attribute nodes (if any) should be 
> generated before any other nodes? 

I've tried hard to avoid using phrases that have any temporal
connotations, i.e. any suggestion that one thing is done before doing
another thing. I think you have read a temporal meaning into the word
"prepended" that wasn't intended. There isn't actually a problem for
implementations: if you say

<a b="c">
  <d/>
</a>

then the b="c" is evaluated first to produce a sequence X containing an
attribute node, the sequence constructor <d/> is evaluated to produce a
sequence Y containing an element node, and the two sequences X and Y are
concatenated (i.e. X is prepended to Y). We should try to find a better
way of saying it, but finding the right words isn't easy. 

Michael Kay

Received on Tuesday, 17 February 2004 11:26:24 UTC