[topicmapmail] ["Jonathan Marsh" <jmarsh@microsoft.com>] RE: XML Base question
Jonathan Marsh
jmarsh@microsoft.com
Thu, 22 May 2003 17:36:38 -0700
You are off base ;-) We are only talking about same document references
such as #foo.
The example you give is not relevant to the section 4.2 or RFC 2396.
Translating your HTML example to XML we have:
<HTML xml:base=3D"http://www.aviary.com/products/intro.html">
<HEAD>
<TITLE>Our Products</TITLE>
</HEAD>
<BODY>
<P>Have you seen our <A href=3D"../cages/birds.gif">Bird
Cages</A>?</P>
</BODY>
</HTML>
with the same results.
I note that if you want a relative reference to id "foo" relative to the
current base (and not to the same document), you would write it ".#foo".
I think RFC 2396 is kind of broken by calling out special treatment for
same-document references, but that's not XML Base's problem.
Also, historically XML Base originated from an attempt to define
relative URIs in the face of external entities (for which XSLT layed
down a precedent). The xml:base attribute grew from that, rather than
an explicit desire to support HTML's BASE construct.=20
> -----Original Message-----
> From: Murray Altheim [mailto:m.altheim@open.ac.uk]
> Sent: Thursday, May 22, 2003 3:36 PM
> To: Lars Marius Garshol
> Cc: topicmapmail@infoloom.com; Jonathan Marsh
> Subject: Re: [topicmapmail] ["Jonathan Marsh" <jmarsh@microsoft.com>]
RE:
> XML Base question
>=20
> Lars Marius Garshol wrote:
> > I got the reply below from Jonathan Marsh after nagging him. Since
> > we've discussed this issue on this list I thought it was only fair
to
> > forward it.
> >
> > * Lars Marius Garshol
> > |
> > | It does not seem to me that XML Base makes it sufficiently clear
what
> > | to do in the following case:
> > |
> > | <!-- document being read from http://www.example.com/foo.xml -->
> > | <doc xml:base=3D"http://www.ontopia.net/bar.xml">
> > | <!-- ... -->
> > |
> > | <link xlink:href=3D"#baz"/>
> > | </doc>
> > |
> > | What does this link resolve to? Is it
> > |
> > | http://www.example.com/foo.xml#baz
> >
> > * Jonathan Marsh
> > |
> > | Yes, according to section 4.2 of RFC 2396.
> >
> > * Lars Marius Garshol
> > |
> > | I think this should be recorded as an XML Base erratum, and that
if
> > | the spec is ever revised an example showing the correct behaviour
in
> > | this case should be added, possibly with a note referring to RFC
2396.
> >
> > * Jonathan Marsh
> > |
> > | I'll pass this on to the XML Core WG as a potential erratum. I
agree
> > | that it's a little tricky, although I'm not sure that RFC 2396 is
> > | sufficiently unclear to require a change.
>=20
> Well, that makes absolutely no sense to me whatsoever. What in the
> heck is XML Base for then? This doesn't operate in the same way as
> HTML's <base> element, and to my recollection it was the HTML WG
> that requested the creation of XML Base (which is borne out by a
> quote below). HTML's <base> has the following example [HTML4], which
> is in direct contradiction to Jonathan's reply:
>
> > For example, given the following BASE declaration and A
declaration:
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> > "http://www.w3.org/TR/html4/strict.dtd">
> > <HTML>
> > <HEAD>
> > <TITLE>Our Products</TITLE>
> > <BASE href=3D"http://www.aviary.com/products/intro.html">
> > </HEAD>
> >
> > <BODY>
> > <P>Have you seen our <A href=3D"../cages/birds.gif">Bird
Cages</A>?
> > </BODY>
> > </HTML>
> >
> > the relative URI "../cages/birds.gif" would resolve to:
> >
> > http://www.aviary.com/cages/birds.gif
>=20
> This is the way it has always worked (as far back as HTML 2.0). The
XML
> Base Recommendation [XMLBASE] states quite clearly in its
Introduction:
>
> "One of the stated requirements on XLink is to support HTML
> [HTML 4.01] linking constructs in a generic way. The HTML BASE
> element is one such construct which the XLink Working Group has
> considered. BASE allows authors to explicitly specify a document's
> base URI for the purpose of resolving relative URIs in links to
> external images, applets, form-processing programs, style sheets,
> and so on."
>=20
> Murray
>=20
> [HTML4] http://www.w3.org/TR/html401/struct/links.html#edef-BASE
> [XMLBASE] http://www.w3.org/TR/xmlbase/
>
........................................................................
..
> .
> Murray Altheim
> http://kmi.open.ac.uk/people/murray/
> Knowledge Media Institute
> The Open University, Milton Keynes, Bucks, MK7 6AA, UK
> .
>=20
> "We can now hypothesise with some confidence that those apparently
> happy, calm Buddhist souls one regularly comes across in places
> such as Dharamsala, India, really are happy," said Professor Owen
> Flanagan, of Duke University in North Carolina. -- BBC News
> http://news.bbc.co.uk/1/hi/health/3047291.stm