<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>1283</bug_id>
          
          <creation_ts>2005-05-03 09:38:02 +0000</creation_ts>
          <short_desc>[XSLT/XQuery] Needless difference between XSLT and XQuery in base URI handling</short_desc>
          <delta_ts>2005-06-10 23:46:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Don Chamberlin">chamberl</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3585</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-05-03 09:38:02 +0000</bug_when>
    <thetext>This is a coordination issue between XSLT and XQuery.

In XSLT, when an element is copied in the course of constructing its parent
element, the base URI of the child element is changed to be the same as its new
parent, unless it has an xml:base attribute that overrides this.

In XQuery, in the same circumstances, the base URI of the child element remains
unchanged.

I don&apos;t think there is any difference in requirements that justifies this
difference in behavior, so we should try to align the specs. I know that both
working groups consciously decided to write the specs the way they are - and
there are arguments for going either way - but I think we should have another
attempt to bring them into line.

The argument in favour of not changing the base URI is that this will tend to
preserve the meaning of any relative URIs in the content being copied.

The argument in favour of changing it is that a tree in which the base URI
changes arbitrarily from one element to another, without any visible signal such
as an xml:base attribute or an external entity reference, is very difficult for
users to understand. There are many other operations (such as serialization)
that cause the base URI to change, and if users want to protect themselves they
should either absolutize the URIs, or use xml:base. In fact there are many cases
where relative URIs are used quite deliberately because the base URI may vary.

There are arguments both ways, but there is no good reason for the two specs to
be inconsistent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3595</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2005-05-03 13:33:32 +0000</bug_when>
    <thetext>
I think another solution would be to get rid of giving xml:base any special 
meaning and just treat them as user-provided attributes.

95% of the users do not understand xml:base anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3596</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-05-03 13:45:26 +0000</bug_when>
    <thetext>If we ignored xml:base we would soon end up in a position where 100% of users
didn&apos;t understand it. Perhaps you&apos;d consider that an improvement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2739</commentid>
    <comment_count>3</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2005-06-10 23:46:24 +0000</bug_when>
    <thetext>Mike,
On May 18, 2005, the Query Working Group discussed your comment and agreed to 
make the following change to XQuery Section 3.7.1.3, Rule 1-e-ii-E: 
&quot;When an element or processing instruction node is copied, its base-uri
property is set to be the same as that of its new parent,
with the following exception: if a copied element node has an xml:base 
attribute, its base-uri property is set to
the value of that attribute, resolved (if it is relative) against
the base-uri property of the new parent node.
All other properties of the copied nodes are preserved.&quot;

Since you were a participant in this discussion, I will mark this comment as 
Fixed and Closed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>