W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2006

[Bug 3416] [XQuery] Base URI of a constructed element

From: <bugzilla@wiggum.w3.org>
Date: Fri, 30 Jun 2006 11:17:58 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1FwH0Y-0006gx-0U@wiggum.w3.org>

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

           Summary: [XQuery] Base URI of a constructed element
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


In XQuery, the rules for the base URI of a newly constructed element (3.7.1.3
clause 5b and 3.7.3.1 clause 4b) say: 

base-uri is taken from the first of the following sources that exists:

   1. the value of the constructed node's attribute named xml:base, if this
attribute exists;
   2. base URI in the static context.

This differs from the equivalent rule in XSLT, which is (last paragraph of
11.2): "The base URI of the new element is copied from the base URI of the
xsl:element instruction in the stylesheet, unless the content of the new
element includes an xml:base attribute, in which case the base URI of the new
element is the value of that attribute, resolved (if it is a relative URI)
against the base URI of the xsl:element instruction in the stylesheet."

I think the XSLT rule is the right one, because it caters for xml:base being a
relative URI (which is common, and useful).

But I think the rule should also reference XML Base to ensure that the
processing of the xml:base attribute is consistent with the rules of that
specification. For example, XML Base mandates percent-escaping of special
characters. Currently this will be done for a document constructed from an
Infoset, but not for a document constructed by a query.

Proposed replacement text:

base-uri is taken from the base URI in the static context, unless the
constructed node has an attribute named xml:base, in which case the base-uri is
the value of this attribute, resolved if it is relative against the base URI in
the static context. The xml:base attribute is processed as described in [XML
Base]: for example, certain special characters are percent-encoded.
Received on Friday, 30 June 2006 11:18:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:12 UTC