RE: Older Sibling?

In XML the order of nodes is defined to be significant. Even if you
construct cases where it is not "conceptually", such as an RDB export into
XML syntax, the order is still significant by definition; just as the order
or records in a relation is by definition *not* significant, even if there
is some serial-number or other field floating around that implies an order
to apps/people that know.

Given that XML is ordered, it does seem pretty strange to not be able to
determine what order any given two things are in.

Put another way, the lack of such functionality contradicts the data model.
I would say that is *why* operations are being asked for that turn out to
be very expensive to simulate.

Just like when you simulate XML with an RDB: traversing nodes just to do an
identity export of a document in the right order, requires extra fields or
relations plus a whole lot of sorting -- one big sort if your RDB models
XML via generic nodes, a gazillion little sub-selects and sorts if it
instead uses a separate relation for each element type.

It isn't surprising in either case that you can simulate the other data
model -- but it costs. The data model and data architecture mismatch, and
that generally leads to high costs down the line.

Much better to add the facility and make the interface match the data model
better. Calculate O() for the common operations needed to keep all the
intermediate results in XPath (and therefore also XPointer) in order, it
will add up real fast.

Steven_DeRose@Brown.edu; http://www.stg.brown.edu/~sjd
Chief Scientist, Scholarly Technology Group, and
   Adjunct Associate Professor, Brown University
North American Editor, the Text Encoding Initiative

Received on Tuesday, 29 February 2000 12:20:12 UTC