TIBCOSoftware / genxdm

GenXDM: XQuery/XPath Data Model API, bridges, and processors for tree-model neutral access to XML.
http://www.genxdm.org/
9 stars 4 forks source link

Should XML:Base (getBaseURI, getDocumentURI) support be made optional? #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Axiom, at least, does not support XML:Base.  In order to implement model/cursor 
getDocumentURI and getBaseURI, we would have to provide something like a weak 
hash map keeping the necessary information around, when we know it.

The current core API includes the methods getDocumentURI and getBaseURI, 
corresponding to XQuery accessors.  However, they are *allowed* to return null 
at any point.  This makes the methods, frankly, meaningless.  You can't tell 
whether these things are supported or not.

My recommendation: take the xml:base methods out of model.  Place them, 
instead, in an interface that provides information on URIs (keep the pattern 
that distinguishes between cursor and model, with N argument and no state or no 
argument and N state). Add a feature indicating support for XML:Base (these two 
methods).

This was discovered by testing.  Return values from the methods, as currently 
defined, are meaningless.  Null could mean that none was supplied, or that URI 
maintenance is not supported.

Original issue reported on code.google.com by aale...@gmail.com on 6 Jan 2011 at 8:13

GoogleCodeExporter commented 9 years ago
Oops.

This is already optional.  Not an issue.

Original comment by aale...@gmail.com on 15 Feb 2011 at 5:33