W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > March 2006

Of xml:base and base URIs

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Wed, 22 Mar 2006 16:32:42 -0500
To: public-xml-core-wg@w3.org
Message-ID: <87ek0ugo79.fsf@nwalsh.com>
Consider the following document located at
file:/tmp/documentbase/document.xml:

<!DOCTYPE doc [
<!ENTITY myent SYSTEM "file:/tmp/entbase/ent.xml">
]>
<doc>
  <p xml:base="file:/tmp/userspecified/base/">
    &myent;
    <link2 xmlns:xlink="http://www.w3.org/1999/xlink"
           xlink:href="../bar.html"/>
  </p>
  <link3 xmlns:xlink="http://www.w3.org/1999/xlink"
         xlink:href="../baz.html"/>
</doc>

where file:/tmp/entbase/ent.xml contains:

<link1 xmlns:xlink="http://www.w3.org/1999/xlink"
       xlink:href="../foo.html"/>

Are we all agreed that the base URIs in question are:

  doc    file:/tmp/documentbase/document.xml
  p      file:/tmp/userspecified/base/
  link1  file:/tmp/entbase/ent.xml
  link2  file:/tmp/userspecified/base/
  link3  file:/tmp/documentbase/document.xml

and the absolutized xlink:hrefs are consequently:

  link1  file:/tmp/foo.html
  link2  file:/tmp/userspecified/bar.html
  link3  file:/tmp/documentbase/baz.html

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Wednesday, 22 March 2006 21:33:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:33 GMT