Re: [F&O] fn:resolve-uri and non-hierarchical base URI

/ Michael Kay <mhk@mhk.me.uk> was heard to say:
| I think we also need some clarification at the data model level (and indeed
| in the xml:base specification). There is currently nothing in the data
| model, or the infoset, or XML base, that says that the base URI of a node
| must be an absolute and/or hierarchic URI. If we believe that resolving a
| relative URI only makes sense against an absolute hierarchic URI then we
| need to ensure that the base URI of a node is always in this form.
|
| I think the intent of the XML Base specification is that the value of the
| xml:base attribute can be a relative URI, and the [base URI] property of the
| node is then obtained by resolving this relative URI against the [base URI]
| of its parent element (or of the document entity or external entity in which
| it appears). (The intent is clear from the example in section 3 of XML Base,
| but there is no text to back it up).  

I brought this up in the XML Core WG and the consensus was[1] that
[base uri] in the Infoset[2] is always absolute (if it exists at all).
The infoset punts the base URI properties off to the XML Base[3]
specification. Bullet 1 in section 4.2 of XML Base says [the base URI
of an element is]:

   1. the base URI specified by an xml:base attribute on the element,
      if one exists, otherwise

The second bullet in section 4.3 says 

   * The base URI for a URI reference appearing in an xml:base
     attribute is the base URI of the parent element of the element
     bearing the xml:base attribute, if one exists within the
     document entity or external entity, otherwise the base URI of
     the document entity or external entity containing the element.

Taken together, these points indicate that a relative URI reference
in a xml:base attribute is always made absolute.

It follows that the [base uri] property in the infoset is absolute.

But the Core WG plans to issue a clarifying erratum to Infoset to make
this point explicit as it takes a fair bit of digging around to reach
the desired conclusion :-)

                                        Be seeing you,
                                          norm

[1] http://lists.w3.org/Archives/Public/public-xml-core-wg/2005Feb/0051.html
[2] http://www.w3.org/TR/xml-infoset/
[3] http://www.w3.org/TR/xmlbase/

-- 
Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Wednesday, 16 February 2005 18:07:07 UTC