[Bug 3415] [XDM] Inheritance of Base URI

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

           Summary: [XDM] Inheritance of Base URI
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Data Model
        AssignedTo: Norman.Walsh@Sun.COM
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


H.2 of the data model says (for the dm:base-uri accessor on element nodes):
"Returns the value of the base-uri property if it exists and is not empty.
Otherwise, if the element has a parent, returns the value of the dm:base-uri of
its parent; otherwise, returns the empty sequence."

I think this makes it unclear whether we are modelling base URI as if it were a
property physically stored with every node, or as something that is computed on
demand. Most of the time we treat it as if it were a stored property, whose
value is always an absolute URI. However, we should be sympathetic to
implementations that actually compute it on demand, since there is otherwise a
great deal of redundancy.

I'll ignore the apparent distinction between a non-existent property and an
empty property. The question is, should we allow this inheritance algorithm to
be invoked at retrieval time, given that all the well-known ways of
constructing an element node actually compute the value of the base-URI
property at the time the element is created? For example, when we construct
from an InfoSet, we take the base URI property of an element from the [base
uri] property of the element information item, and the InfoSet says that this
property is computed according to the rules in XML Base.

I think that the rule in XDM that makes the accessor walk up the tree is wrong.
Real implementations might behave this way, but we should model it as if base
URI is a stored property, with any inheritance being done at node construction
time.

On the same subject, I believe that the rules, certainly for construction of
XDM from an Infoset, have the consequences that (a) the base URI property if it
exists is always an absolute URI, and (b) the computation of the base URI
property from the actual value of the xml:base attribute includes
percent-escaping of special characters. It would be useful to make this clear,
since it otherwise requires a complex paper-chase to discover this information.

Received on Friday, 30 June 2006 11:07:42 UTC