- From: Konrad Lanz <Konrad.Lanz@iaik.tugraz.at>
- Date: Tue, 30 May 2006 20:06:53 +0200
- To: Richard Tobin <richard@inf.ed.ac.uk>
- CC: "Grosso, Paul" <pgrosso@ptc.com>, public-xml-core-wg@w3.org
Hi Richard, Richard Tobin wrote: > [...] >> <a xml:base="one/two"> >> <b xml:base="//three/four/./five/./../file.xsd"> >> <c xml:base="a.file"/> >> <d> >> <e xml:base="#bare-name"> >> <f xml:base=""/> >> <f1/> >> </e> >> <g xml:base="//six/"/> >> </d> >> <h xml:base="http://www.iaik.tugraz.at"> >> <i xml:base="/aboutus/people/index.php"> >> <j xml:base="lanz/index.php"> >> </i> >> </h> >> </b> >> </a> >> RFC 2396 section 5.2 step 2) is as follows: """ 2) If the path component is empty and the scheme, authority, and query components are undefined, then it is a reference to the current document and we are done. Otherwise, the reference URI's query and fragment components are defined as found (or not found) within the URI reference and not inherited from the base URI. """ The question is what does "current document" mean in the above and in combination with an xml:base attribute supplied? My view is that xml:base has precedence as (xml:base http://www.w3.org/TR/xmlbase/#matching second bullet point) says the following: """ The base URI for a URI reference appearing in an |xml:base| attribute is the base URI of the parent element of the element bearing the |xml:base| attribute, if one exists within the document entity or external entity, otherwise the base URI of the document entity or external entity containing the element. """ which gives precedence to the "base URI of the parent element of the element bearing the |xml:base| attribute" and hence the following would result without additional removal of dot segments. All uris but the ones starting with "http://..." are not absolute (cf. RFC 2396 section 5.2 step 3) : assuming that the document's URI is file:///tmp/foo.xml: <a base-uri="file:///tmp/one/two"" xml:base="one/two"> <b base-uri="file://three/four/./five/./../file.xsd" xml:base="//three/four/./five/./../file.xsd"> <c base-uri="file://three/four/a.file" xml:base="a.file"/> <d base-uri="file://three/four/./five/./../file.xsd"> <e base-uri="file://three/four/a.file#bare-name" xml:base="#bare-name"> <f base-uri="file://three/four/a.file#bare-name" xml:base=""/> <f1 base-uri="file://three/four/a.file#bare-name"/> </e> <g base-uri="file://six/" xml:base="//six/"/> </d> <h base-uri="http://www.iaik.tugraz.at" xml:base="http://www.iaik.tugraz.at"> <i base-uri="http://www.iaik.tugraz.at/aboutus/people/index.php" xml:base="/aboutus/people/index.php"> <j base-uri="http://www.iaik.tugraz.at/aboutus/people/lanz/index.php" xml:base="lanz/index.php"/> </i> </h> </b> </a>
Received on Tuesday, 30 May 2006 18:07:12 UTC