Search the web
Sign In
New User? Sign Up
xtm-wg · TopicMaps.org
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
The xml:base problem   Message List  
Reply | Forward Message #2607 of 2640 |
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



Fri Jul 27, 2001 6:06 pm

murray.altheim@...
Send Email Send Email

Forward
Message #2607 of 2640 |
Expand Messages Author Sort by Date

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...
Lars Marius Garshol
larsga@...
Send Email
Jul 27, 2001
12:30 pm

Lars Marius Garshol wrote: [...] ... Well, it's not *quite* correct, but very close. Paul Grosso and others ... don't make rational sense. HTTP servers have a...
Murray Altheim
murray.altheim@...
Send Email
Jul 27, 2001
6:09 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help