[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [xtm-wg] The xml:base problem
Murray Altheim and I debated at length on this list how to interpret relative URI references and the URIs of elements in the presence of xml:base attributes. I believe I have now, with a little help, been able to find out how this is supposed to work. The answer satisfies me, but I believe that most XTM implementors will be surprised by the answer. I posting my understanding of this issue here, both for the record, and also so that anyone who thinks I am wrong can correct me. Here is an example, to make things a bit clearer: (in a document residing at "http://www.quux.com"): <topicMap xml:base="http://foo.com/"> <topic id="bar"> <instanceOf> <topicRef xlink:href="#baz"/> </instanceOf> ... </topic> ... </topicMap> The main questions were: - what is the URI of the "bar" topic? - what URI is "#baz" referring to? It turns that the answer to the first question is not defined anywhere, but that the only sensible answer is "http://www.quux.com/#bar". That is, the URI is not affected by the changed xml:base inside the document. The reason this is so has to do with the answer to the second question. URIs found in a document are always in a situation where that document has a document URI, and this may have been modified inside the document, so that inside the document a different base URI is in effect. It turns out that there are not two kinds of URI references, as most people think (until recently this group included me), but three: - absolute URI references. These are, of course, independent of the base URI of the context they appear in. - relative URI references. These are resolved relative to the base URI of the context. - same-document references. These are of the form "#xxx" and are resolved not relative to the base URI, but relative to the document URI. So because "#baz" is a same-document reference it resolves to http://www.quux.com/#baz Had it been "baz.html" it would have resolved to http://foo.com/baz.html The reasons I believe the above is correct can be found in: <URL: http://lists.w3.org/Archives/Public/www-xml-linking-comments/2001AprJun/0158.html > and in RFC 2396, section 4.2. In the particular discussion Murray and I had, he was right with respect to what the subject indicators of the topics in the language.xtm and country.xtm topics were, and I was wrong. I am not sure that his explanation of the general rules for this situation was right, but I didn't fully understand it, so it may have been. --Lars M. ------------------------ Yahoo! Groups Sponsor ---------------------~--> Small business owners... Tell us what you think! http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/2U_rlB/TM ---------------------------------------------------------------------~-> To Post a message, send it to: xtm-wg@yahooGroups.com To Unsubscribe, send a blank message to: xtm-wg-unsubscribe@yahooGroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC