Re: ORA-DM-ORDERTOTAL

> *Data Model, Section 3.2 Document order*
> The first paragraph says that a document order is total.
> The last two paragraphs broaden the discussion to include order between 
> nodes in different documents, or not in a document at all.
> Is it intended that the ordering in the latter two paragraphs is total? 
> Or could a conforming implementation simply say, "I choose not to define 
> an ordering between nodes in different documents, or between nodes not 
> in any document. My ordering of these things is the trivial ordering, 
> the one which such things simply have no ordering."?
> 
> Put another way, is there anything that breaks if an implementation is 
> not able to place a collection of free-standing nodes into a stable order?

Yes, for example:

$someNodeSet[2]

where $someNodeSet contains nodes from at least two different documents. Using a
positional predicate requires that there is total order on any node-set.

This order must be stable, otherwise one may get different results on two different
references to the above XPath expression.

Because sets are unordered by definition, it is meaningless to talk about some other
order (e.g. order of nodes as they come in the node-set) except document order,
which is specified in XPath with exactly the purpose of being the only order
specified.

Therefore, document order covers by definition all types of node-sets, including the
case of node-sets comprising nodes from different documents.

I also find the name "document order" confusing in this last case.

Probably "canonical order" or any name which doesn't refer only to a (single)
document will be better.


Dimitre Novatchev.

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Received on Wednesday, 25 June 2003 09:23:10 UTC