[sc34wg3] xml:base in XTM

Lars Marius Garshol sc34wg3@isotopicmaps.org
Sat, 23 Oct 2004 18:21:29 +0200


* 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.

| Which is the correct way of resolving same-document references and
| ID attributes in XTM ? And if its the former method, can we change
| it to the latter in the next version of the standard ?

We can, if we want to. This has been discussed extensively, but I'm
not necessarily against raising it again. We settled this before the
W3C noticed this problem and cleaned up the base specs that RDF/XML is
specified on top of. I should have participated in this discussion
when it was going on, but didn't find the time. :-(

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