[Bug 4992] Object identity needs to be clarified

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





------- Comment #1 from sandygao@ca.ibm.com  2007-09-19 20:23 -------
Agree that identity of element information items is not always possible to
detect; and because we don't mandate XPath 2.0, we can't rely on node identity
defined in "XQuery 1.0 and XPath 2.0 Data Model (XDM)".

A concrete example:
<p><c/><c/></p>
Nothing in the infoset can tell the 2 "c" sub-elements apart.

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.

Note: The above #2 could be read to allow a (not very useful) conforming SML
processor to treat *all* resolvable references as invalid. But it is important
to allow it, to be able to use existing XML processing services. (Many XML APIs
can tell the difference between the 2 "c" elements in the above example.)

It doesn't seem like SML-IF can be more deterministic. Because documents are
allowed to be included "by reference", and resolving these references may
involve using (in Java terms) entity resolvers, which may return the same
resource for different URIs, hence making it very difficult or impossible to
tell whether 2 elements are meant to be the same.

So I suggest that SML-IF should following the same suggestion as that for SML
core.

Received on Wednesday, 19 September 2007 20:23:58 UTC