XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] xml:base and fragments

> 
> If you’ve previously retrieved string1 as the base URI, then what the paragraph actually says was that you shouldn’t need to trigger a new retrieval of string2 because both are equal and refer to the same resource content that you have already loaded.
> 
> If you haven’t actually retrieved string1 as the base URI *and* you’re dereferencing the target as part of a retrieval action, then you have no choice but to trigger a new retrieval action (because you don’t have it yet).
> 
> What I still didn’t understand was your:
> 
>>> * the reference is interpreted as a reference to the entity containing the reference, even if that entity is completely unrelated to anything you might find by retrieving the resource at http://A/. 
> 
> Because it must be related if you’ve already loaded it, and it by definition is a "same-document” reference.  How could it be completely unrelated?
> 
> 

Let's say a document located at http://www.saxonica.com/foo.xml contains (a) the attribute xml:base="http://www.microsoft.com/bar.xml";, and (b) the attribute href="". Resolving @href against the base URI gives "http://www.microsoft.com/bar.xml";. The expanded value of href is the same as the base URI, so the spec says this is a same-document reference, so under section 4.4 the @href is assumed to refer to http://www.saxonica.com/foo.xml, not to http://www.microsoft.com/bar.xml. In other words, xml:base is effectively ignored - technically it's used to expand the relative reference, but the document you get back isn't the document at that location.

> 
> What is your concern behind the observation?  Have you seen this behavior in the wild?
> 

I have spent countless hours trying to decide what RFC 3986 and related specs mean, in order to ensure that specifications like XSLT and XPath are consistent with the RFC, and that my software products are conformant. My concerns are that (a) it's often very difficult to decide what they mean even after close study, and (b) sometimes when you work out what they mean, it's the last thing the user would expect.

Michael Kay
Saxonica



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS