Ah bugger.

Document.baseURI vs Document.documentElement.baseURI

I hereby eat my words.

Thanks for the clarifications.


On Mon, Mar 17, 2008 at 7:40 PM, Daniel Veillard <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 15, 2008 at 09:59:30PM +1030, Daniel O'Connor wrote:
>  > Hey all,
>  > I'm causing trouble for Richard by asking for things like:
>  > http://bugs.php.net/bug.php?id=44367
>  >
>  > Basically, what happens in the following scenarios with the baseURI of
>  > a document?
>  >
>  >  1. A document is loaded from a URI (http://foo.com/)
>  >  2. An xhtml document is loaded from a URI  (http://foo.com/), but has
>  > a <base href="http://bar.com/"; />
>  >  3. An xml document is loaded from a URI, but has an <Foo
>  > xml:base="http://bar.com/"; />
>  >  4. An xml document is loaded from a URI, which was redirected (GET
>  > http://foo.com/ redirected to http://bar.com/)
>  >  5. An xml document is loaded, and has an xml:base attribute - but
>  > it's not on the root element (/Foo/[EMAIL PROTECTED]:base])
>  >
>  >
>  > >From what I read of http://www.faqs.org/rfcs/rfc2396.html, section 5.1
>  > & on, I think it should be:
>  >
>  > 1. http://foo.com/
>  > 2. http://foo.com/
>  > 2a. Unless the implementation understands xhtml / html - http://bar.com/
>
>   that's an interpretation on top of the original XML view
>
>  > 3. http://bar.com/
>
>   Wrong, the base applies only to the element carrying the xml:base and below.
>  If you ask for the *document base* the document node is an ancestor of Foo
>  and the answer is still the original URI
>
>  > 4. http://bar.com/
>
>   xmlCheckHTTPInput does this, it's called by xmlNewInputFromFile() in libxml2
>  it is possible it may be missing in some case, or the PHP I/O architecture
>  doesn't do something similar.
>
>  > 5. http://foo.com/
>
>   Wrong, same misunderstanding as 3/
>
>
>  >
>  > The current behavior for PHP (using libxml2 2.6.31) isn't that.
>
>   I can't tell for PHP, but at least 2 of your expectations are clearly
>  wrong from purely a spec perspective.
>
>  Daniel
>
>  --
>  Red Hat Virtualization group http://redhat.com/virtualization/
>  Daniel Veillard      | virtualization library  http://libvirt.org/
>  [EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
>  http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
>



-- 
Looking for a new php job? See what you can do with
https://vx.valex.com.au/tests/season/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to