OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

topicmaps-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: [xtm-wg] The xml:base problem


Lars Marius Garshol wrote:
[...]
> 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.

Well, it's not *quite* correct, but very close. Paul Grosso and others 
have argued (I believe quite correctly) that URLs of the form:

>   http://www.quux.com/#baz

don't make rational sense. HTTP servers have a default directory filename
that is often "index.html" but can be customized to be "index.asp" or
anything else. A fragment identifier ("#baz") always is an intra-document
link, i.e., it is based upon an ID within a document, such as would be
resolved via an IDREF. So the URL above is a reference to a server path 
plus a fragment identifier. It is missing its document name. Because of 
the defaulting of most HTTP servers this "works" but it is missing the
defaulted information: the document filename. Relying on this server 
defaulting is unreliable in the long run, and certainly for things that
are supposed to have longevity such as PSIs, it's a real mistake (i.e., 
changing to a different ISP or server could really muck it all up).

HTML's <base> element allows a document to be portable in the sense that
one can state the "canonical" location of a document so that if downloaded
to a local directory, it can still resolve its relative references (e.g.,
to graphics and other linked files). The 'xml:base' attribute works in the
same was as HTML's <base> in that it allows a document to be similarly
portable. 

In our use of 'xml:base' in XTM, it allows an XTM document to still 
establish its set of PSIs no matter where it may sit, even on a laptop
on a train, or on a plane (I could not, would not, on a boat. I will not, 
will not, with a goat. I will not eat them in the rain. I will not eat 
them on a train... et cetera).

What we've done with the XTM topic maps that are part of the XTM 1.0 
Specification is establish their "home" directories with an 'xml:base'
attribute. This means that even when the topic map is sitting on my
laptop, an XTM process (indeed, any XML processor) to understand where
it should "live" in terms of the PSIs being establish, and in terms of
the relative links. 

For example, let's say I download the 'core.xtm' topic map and put it
in my local directory at 'file:///home/altheim/work/xtm'. Absent the
'xml:base' attribute in the file, the PSIs established by its topics 
would look like:

     file:///home/altheim/work/xtm/core.xtm#topic
     file:///home/altheim/work/xtm/core.xtm#occurrence
     file:///home/altheim/work/xtm/core.xtm#association
     file:///home/altheim/work/xtm/core.xtm#class-instance
     ...

This is plainly not as was intended. Because the topic map does include
of 'xml:base' value pointing to the XTM 1.0 directory (i.e., having a
value of "http://www.topicmaps.org/xtm/1.0/", they are correctly
established as

     http://www.topicmaps.org/xtm/1.0/core.xtm#topic
     http://www.topicmaps.org/xtm/1.0/core.xtm#occurrence
     http://www.topicmaps.org/xtm/1.0/core.xtm#association
     http://www.topicmaps.org/xtm/1.0/core.xtm#class-instance
     ...

Without 'xml:base' we would have had to do something custom to XTM or 
not rely on topic IDs for our fragment identifiers, and use some sort of
PSI attribute values to establish them, which would have been ugly and
introduce possible discontinuity between the topic identifier and the
PSI it creates. Because the W3C created 'xml:base' precisely for the 
purpose expressed above, we're using it. There are examples in the 
XML Base Recommendation [XMLBASE] that show all of this in some detail.

Murray

[XMLBASE] XML Base, W3C Recommendation 27 June 2001.
   http://www.w3.org/TR/xmlbase/ 
...........................................................................
Murray Altheim                         <mailto:murray.altheim&#x40;sun.com>
XML Technology Center
Sun Microsystems, Inc., MS MPK17-102, 1601 Willow Rd., Menlo Park, CA 94025

      In the evening
      The rice leaves in the garden
      Rustle in the autumn wind
      That blows through my reed hut.  -- Minamoto no Tsunenobu

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