[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xml:base and fragments

  • From: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
  • To: "Andrew S. Townley" <ast@atownley.org>
  • Date: Tue, 9 May 2017 21:37:33 -0600

Re:  xml:base and fragments
> On May 9, 2017, at 5:00 PM, Andrew S. Townley <ast@atownley.org> wrote:
> 
> ...
> 
> The way I read the definition of “same-document” means that it’s relative to the currently appropriate base URI, so even Section 4.4 has to follow the scoping rules such that if you had something like:
> 
> <e xml:base="http://www.microsoft.com/bar.xml”>
>  <bar href=“”/>
> </e>
> 
> According to Section 4.4 and Section 5.1, this empty href is a “same document” reference to the active base URI, in this case http://www.microsoft.com/bar.xml, and NOT the URI used to retrieve the entity (5.1.3) and step 3 of the base URI resolution.
> 
> More specifically, if you expanded the above example:
> 
> <e xml:base="http://www.microsoft.com/bar.xml”>
>  <bar href=“”/>
>  <baz href=“#node1”/>
> </e>
> 
> According to the RFC, the bar href must expand to "http://www.microsoft.com/bar.xml” and the baz href must expand to "http://www.microsoft.com/bar.xml#node1” making both bar and baz href “same-document” references to the active base URI defined in the content (resolution step 1) via the xml:base attribute.
> 
> In my reading of the spec, there is no situation where the above examples would declare either bar or baz href as being a “same-document” reference for the URI used to retrieve the entity, because this is not the base URI in scope within the element ‘e’.

Does that mean you believe they are not present within the document 
currently loaded?   

Or that the document currently loaded is not identified by the URI from
which it was loaded?

> 
> In this case:
> 
> <root>
>  <e xml:base="http://www.microsoft.com/bar.xml”>
>    <bar href=“”/>
>    <baz href=“#node1”/>
>  </e>
>  <bar href=“”/>
> </root>
> 
> The 3 absolute URIs created according to the RFC and XML Base should be:
> 
> http://www.microsoft.com/bar.xml
> http://www.microsoft.com/bar.xml#node1
> http://www.saxonica.com/foo.xml
> 
> Varying the example somewhat:
> 
> <root xml:base="http://www.microsoft.com/bar.xml”>
>  <e>
>    <bar href=“”/>
>    <baz href=“#node1”/>
>  </e>
>  <bar href=“”/>
> </root>
> 
> You still don’t have an issue here because the content-defined base URI is the root of the XML document and applies “globally”, e.g.:
> 
> http://www.microsoft.com/bar.xml
> http://www.microsoft.com/bar.xml#node1
> http://www.microsoft.com/bar.xml
> 
> You never should have a situation where http://www.saxonica.com/foo.xml is chosen as the base URI according to the RFC at all in the last example.

So are you saying that Roy Fielding was wrong when he responded 
in [1] to Paul Grosso’s inquiry in [2] by saying that in cases analogous
to the one MK describes, the reference is a same-document reference
and can and should be retrieved from the document that has 
been already loaded (in MK’s case the document a www.saxonica.com)?

[1] https://lists.w3.org/Archives/Public/uri/2004Jan/0009.html
[2] https://lists.w3.org/Archives/Public/uri/2004Jan/0007.html



********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
cmsmcq@blackmesatech.com
http://www.blackmesatech.com
********************************************



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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.