[topicmapmail] ["Jonathan Marsh" <jmarsh@microsoft.com>] RE: XML Base question

Lars Marius Garshol larsga@garshol.priv.no
25 May 2003 18:33:53 +0300


* Lars Marius Garshol
|
| Not really. You can just give the full URI directly in the XTM
| document that you distribute. That solves the problem.

* Murray Altheim
| 
| No, if I download (for example) the language.xtm document from the
| XTM 1.0 website directory, [...]

The problem you point out with language.xtm is of course correct, but
that does not contradict what I wrote. I wrote "just give the full URI
directly in the XTM document that you distribute", and language.xtm
does not do this, so we are not talking about the same thing.

| In fact, once downloaded, if we can't use xml:base to tell the
| processor that the canonical location of the document, it's
| canonical base URI, is at topicmaps.org, then there's no way to
| distribute and use local copies of PSI documents.

Yes, there is. See

  <URL: http://psi.oasis-open.org/iso/639/639-core.xtm >
 
which does it as follows:

  <topic id="language">
    <subjectIdentity>
      <subjectIndicatorRef xlink:href="http://psi.oasis-open.org/iso/639/#language"/>
    </subjectIdentity>
    <baseName>
      <scope><subjectIndicatorRef xlink:href="http://psi.oasis-open.org/iso/639/#eng"/></scope>
      <baseNameString>Language</baseNameString>
    </baseName>
    <baseName>
      <scope><subjectIndicatorRef xlink:href="http://psi.oasis-open.org/iso/639/#fra"/></scope>
      <baseNameString>Langue</baseNameString>
    </baseName>
  </topic>

The PSIs are given as absolute URIs, which means that when you
download the XTM file and read it locally you get the same URIs.

| I admit that would be silly, and inappropriate. If your application
| has already parsed an XML document (which is where you encountered
| the fragment ID in the first place) and are resolving internal
| fragment IDs within that document, as in your example,
| 
|  >   <xxxRef xlink:href="#foo"/>
| 
| You simply use the resource you're already in. If RFC 2396 suggests
| that you'd want to download a different resource when resolving
| local references within a document, that doesn't make any sense.

That is precisely what RFC 2396 does not say. It says that this URI,
when absolutized, becomes

  document-uri#foo

which is of course what we've been discussing all along. If it said
that the URI absolutized to

  base-uri#foo

we would have the situation you describe: processors wanting to
resolve the URI would find themselves downloading the canonical
document from the canonical location, which what we wanted to avoid.

So the rationale for the decision you don't like in RFC 2396 and XML
Base (bare fragment references (like "#foo") resolve relative to the
document URI rather than the base URI) is precisely to enable the
behaviour that you here say you want.

In short, I'm a bit confused about why you are unhappy about this.
Not that it really matters whether any of us are happy or unhappy
about this: RFC 2396 says what it says, and we, like XML Base, must
follow it.

What we *could* do is try to come up with some workaround if this
causes problems for XTM users. But as far as I can tell it does not.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >