[sc34wg3] xml:base in XTM

Murray Altheim sc34wg3@isotopicmaps.org
Sat, 23 Oct 2004 18:38:47 +0100

Lars Marius Garshol wrote:
> * Kal Ahmed
> | 
> | Up until now, TM4J has always resolved ID attribute values against
> | the URL which specifies the location from which the topic map was
> | read (ignoring any xml:base attributes), and resolves all
> | same-document references (of the form '#foo') the same way.
> | References to other documents that use relative URIs are resolved to
> | full URIs using the xml:base value currently in force at the point
> | where the reference is encountered.
> This is what the XTM 1.1 specification says is correct.
> | The RDF/XML spec [1] however says that an rdf:ID attribute of 'foo'
> | should be treated as equivalent to rdf:about="#foo" and that this
> | should then be resolved to a full URI using xml:base value currently
> | in force.  I find this more internally consistent and a lot easier
> | to understand.  The queries from my users indicate that this is the
> | behaviour they expect in XTM files as well.
> We've discussed this a number of times in the committee, actually:
> <URL: http://www.ontopia.net/omnigator/models/topic_complete.jsp?tm=tm-standards.xtm&id=xtm-same-doc-refs >
> The trouble with this is approach is if you have a document A.xtm,
> where A.xtm has an xml:base that does *not* refer to where A.xtm is
> actually located. In that case the <topicRef>s in A.xtm will point out
> of A.xtm to the base location, and you will either get a bad reference
> (if there's nothing there) or read (hopefully) the same document over
> again.
> You also get difficulties if there is a B.xtm in the same directory as
> A.xtm, containing a <topicRef xlink:href="A.xtm#foo"/>, since although
> this correctly references the 'foo' topic in A.xtm the software won't
> actually recognize this ('foo' will have a different source locator),
> and you'll get a broken reference.
> So to me the current behaviour *seems* like the right one, but I
> wouldn't mind a better discussion of this issue than we've had before.

Lars Marius,

I haven't followed the entirety of the discussion, but my take on
this is that any relative references being used within an XTM
document that are meant as PSIs will rely on the absolute URL
obtained by addition of the xml:base to the fragment identifier,
regardless of where the document is located. It shouldn't matter
where an XTM document is located when an xml:base attribute is
provided (this was always the entire point of xml:base, and the
<base> element in HTML, which is the origin of this in XML -- it
was a requirement pushed from the HTML WG on the XML WG considered
as necessary to support similar functionality to what we thought
we were doing in XTM 1.0). If xml:base starts doing something
entirely different, I'd just recommend striking its use entirely
from XTM.

But as I said, I've not followed the sc34wg3 discussions on this
subject in detail...


Murray Altheim                    http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

   A schoolteacher at a Bush event was on her way to the bathroom when
   she was stopped by a volunteer and told she wasn't welcome. The
   volunteer pointed to her T-shirt and said it was 'obscene'. She and
   her two friends (also wearing the same shirts) were escorted out by
   police officers and threatened with arrest if they did not comply.

           The T-Shirts read: 'Protect Our Civil Liberties'"

   Shutting Them Up

   Dismantling Democracy