[Bug 4992] Object identity needs to be clarified

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4992





------- Comment #6 from kumarp@microsoft.com  2007-11-14 06:52 -------
I like Sandy’s original proposal (in comment# 1). Repeated below for easy
reference:

----------
Suggestion for SML core:
1. SML processors MUST NOT treat two element information items as identical (or
the same) if they can be distinguished using information in the infoset. (i.e.
their infoset properties are not recursively pair-wise equal.)
2. If two element information items have pair-ware equal properties, SML
processors MAY still treat them as different, if processors have other ways to
distinguish them.
----------

If we talk about any specific scheme, it brings in additional complexity. Even
for a scheme that we all know well, such as the SML uri scheme, it is not easy
to define identity looking at the scheme data alone. We may have different URIs
pointing to the same document. At runtime, an implementation will resolve 2 or
more schemes to get 1 element from each resolution. At this point, the
implementation has to decide looking at the element instances whether they are
the same. Once the result of each resolution is obtained, the implementation
does not really need to look at scheme data to decide whether the element
instances are the same or not. It can apply the above criteria to decide
equality. In most implementations, where each instance document has only 1
runtime DOM instance, this simply means invoking the == operator yielding a
very fast comparison. Most implementations will never need to perform recursive
pair-wise comparison.

Since these criteria define equality in terms of element info items (leaving
out scheme complexity), they are very easy to define and understand. 

Received on Wednesday, 14 November 2007 06:52:54 UTC