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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>17423</bug_id>
          
          <creation_ts>2008-02-18 07:55:09 -0800</creation_ts>
          <short_desc>ER: Add support for xml:base</short_desc>
          <delta_ts>2023-05-22 04:06:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>XML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.codedread.com/browser-tests/test-xml-base.xhtml</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeff Schiller">jeffschiller</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alex</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>ian</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>me</cc>
    
    <cc>nicholas</cc>
    
    <cc>sonny.piers</cc>
    
    <cc>webdev</cc>
    
    <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71047</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff Schiller">jeffschiller</who>
    <bug_when>2008-02-18 07:55:09 -0800</bug_when>
    <thetext>The following document renders as expected in Firefox and Opera.  The document fails in Webkit latest nightly:

http://www.codedread.com/browser-tests/test-xml-base-xhtml

xml:base should be supported in XHTML (on any valid element, of course).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71049</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-02-18 08:59:12 -0800</bug_when>
    <thetext>You ask for implement XML Base specification: http://www.w3.org/TR/xmlbase/ So it&apos;s an enhancement request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72647</commentid>
    <comment_count>2</comment_count>
    <who name="Jeff Schiller">jeffschiller</who>
    <bug_when>2008-03-03 18:05:58 -0800</bug_when>
    <thetext>Just noticed that the URL I pasted in the bug report is missing the .xhtml.  The correct URL is as per the URL field.  http://www.codedread.com/browser-tests/test-xml-base.xhtml</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72731</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-03-04 13:05:16 -0800</bug_when>
    <thetext>See also: bug 12579.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124156</commentid>
    <comment_count>4</comment_count>
    <who name="Christophe Gillette">christophe.public</who>
    <bug_when>2009-06-03 09:37:40 -0700</bug_when>
    <thetext>The document completeURL method should probably take an optional node parameter. 
If the node is present, then resolving a relative URL to an absolute one should go up through its ancestors (including itself) to find the first available xml:base, and use it as baseURL.
When no node is supplied or no xml:base is found, the document m_baseURL is used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>357887</commentid>
    <comment_count>5</comment_count>
    <who name="Nicholas Wilson">nicholas</who>
    <bug_when>2011-02-25 06:44:05 -0800</bug_when>
    <thetext>Worse, it should go through and check all the ancestors, as xml:base instructions can themselves be relative if they don&apos;t start with / or a scheme. This is acceptable in terms of performance (what&apos;s a log between friends?). 

Roughly how many callers of completeURL would need to be modified to use the new signature suggested? Could we make a test case covering every way place completeURL is called to give a target?

This is a pretty annoying for me if unimplemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>357948</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-02-25 08:56:16 -0800</bug_when>
    <thetext>completeURL() can be called very frequently, so it is important to watch its performance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>417944</commentid>
    <comment_count>7</comment_count>
    <who name="Alex Milowski">alex</who>
    <bug_when>2011-06-09 04:18:01 -0700</bug_when>
    <thetext>Looking at the HTML 5 specification [1], the &apos;src&apos; attribute should be resolved against the element&apos;s base URI.  As the xml:base attribute correctly affects the baseURI property in the DOM, this should be straight forward to fix (but those are famous last words).

One thing that isn&apos;t clear in the HTML5 specification is whether changing the xml:base attribute should cause the image URI to be recalculated.  There is a whole section of how the state of the image element changes when the &apos;src&apos; attribute is set.  It doesn&apos;t say much about how the state is handle if the base URI changes via setting the xml:base attribute.  It think it should be the same as if the &apos;src&apos; attribute is set but I&apos;ll have to file a bug on the HTML5 specification to get that clarified.

[1] http://dev.w3.org/html5/spec/Overview.html#resolving-urls
[2] http://dev.w3.org/html5/spec/Overview.html#the-img-element</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>418080</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-09 10:10:46 -0700</bug_when>
    <thetext>Changing the base URL only causes a reresolution where the spec says it does. I don&apos;t explicitly list all the places where it doesn&apos;t, because there&apos;s so many of them, but if you look in the spec source you&apos;ll see comments here and there saying something like &quot;note that this doesn&apos;t happen when the base URL changes&quot;, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>418088</commentid>
    <comment_count>9</comment_count>
    <who name="Alex Milowski">alex</who>
    <bug_when>2011-06-09 10:28:02 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Changing the base URL only causes a reresolution where the spec says it does. I don&apos;t explicitly list all the places where it doesn&apos;t, because there&apos;s so many of them, but if you look in the spec source you&apos;ll see comments here and there saying something like &quot;note that this doesn&apos;t happen when the base URL changes&quot;, etc.

I did just notice the section on &quot;Dynamic Changes to base URLs&quot; [1] where there is a note about the &apos;img&apos; element.  I think that specifies the complete behavior for the &apos;img&apos; element.  

1. The base URI as calculated with respect to the xml:base must be used to resolve the value of the &apos;src&apos; to get the URI of the image.

2. Changes to the base URI of the &apos;img&apos; element do not cause the viewed image to be changed.  You would have to set the &apos;src&apos; attribute (or something like that) to cause it to be resolved again.

3. The &apos;src&apos; attribute in the interface should always return the correct resolved URI value against the base URI--including one changed after the image location is resolved and presented to the user.


[1] http://dev.w3.org/html5/spec/Overview.html#dynamic-changes-to-base-urls</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>418149</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-09 11:46:02 -0700</bug_when>
    <thetext>Yup. Note that this behaviour is not a result of the note you mention (actually that&apos;s a non-normative example — I&apos;ve clarified that it&apos;s an example in the spec now), it&apos;s a result of the requirements and lack of requirements throughout the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956912</commentid>
    <comment_count>11</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-05-22 04:06:04 -0700</bug_when>
    <thetext>This is not a feature we wish to support.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>