Re: essential test cases?

On Thu, 15 Jun 2000, James Clark wrote:

> keshlam@us.ibm.com wrote:
> 
> > DOM L2 doesn't guarantee that the
> > base URI can be retrieved.
> 
> This seems to me a major deficiency in DOM Level 2 whatever conclusion
> this discussion reaches.  Without the base URI, many kinds of processing
> of documents that use URI references (eg in attribute values) are
> impossible.  It's strange to me for a W3C Rec to lack proper support for
> URI references. Note in particular the base URI is required for
> implementing XSLT, which means it is impossible to implement the XSLT
> Recommendation using DOM Level 2 without using non-interoperable
> extensions to the DOM. It's also part of the Infoset (at least it is the
> current public WD.) 

I think there is a fair amount of agreement here.  It is believed to be a
property of the node.  But it would be a mistake (IMO) to add it before 
xml:base becomes a standard, or then it seems you need to have a big switch 
you can throw for compatibility with applications written before and after 
xml:base became recognized by the implementation.  Quite a mess because
people will invariably start using it as soon as it becomes a standard
and then when the DOM specification and then implementations finally
release, they break applications that were already using it through
the existing DOM specification and implementations which did not include 
it.

The problem becomes entirely different, of course, when you want to use
this base for identity, rather than retrieving a resource, because then
all parts of the system involved in retrieving entities, possibly even
relying on implementation-specific decisions whether to look up the
system ID or the public ID, now must magically produce URIs that match
byte-for-byte with each other and possibly with absolute forms, too, even
where perhaps no URI was used to fetch the document entity to begin with,
so one was chosen from many possible equivalent URIs.

Even without the identity match requirement, assuming absolutization of
namespaces fails, DOM often has to go beyond what infoset defines, 
because infoset does not deal with the all-important cases of mutating 
the hierarchy, so for example if you move a node from one point to 
another, does the base stay the same or inherit from the new location?

> > If you have Entity Reference nodes, you can
> > search upward until you find one; if you hit the top of tree, you can then
> > assume the base URI of the Document.
> 
> How do you get the base URI of the Document?  The HTMLDocument interface
> has a URL attribute but I don't see anything comparable for XML.
> 
> James

Also, under what circumstances is there no base URI, or does the base URI 
change, how does the document respond to changes in the base URI, etc. and
I am sure that is just the start.

It is one of those seemingly-simple things that we would have shoved in, 
but if there isn't time to do it right, when will there be time or resolve 
to fix it?

Ray Whitmer
ray@xmission.com

Received on Thursday, 15 June 2000 12:35:08 UTC