[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [xtm-wg] Correct use of published subjects
* Murray Altheim | | As I mentioned previously, the set of PSIs established by the | existing language.xtm and country.xtm work completely well as PSIs, | even if there are perceived errors in the topic map itself. There is | no emergency here; we can wait six weeks. The xml:base problem you | cite is simply a matter of Lars Marius misunderstanding the xml:base | specification, If that's the case it would be great, since it would mean that this particular problem is a tiny one of some people possibly being mislead, rather than the rather major one it seems to be at the moment (from my point of view). There are two issues here: a) what is the URI of an element with an ID attribute in the presence of an xml:base attribute? b) what is the URI in an xlink:href attribute in the presence of an xml:base attribute? The XML Base recommendation only deals with issue b), and there is no guidance that I can find in XML Base, XML Infoset, XTM, or TMPM4 on issue a). The only place where that is found is in my processing model proposal (which of course is not normative). I can see two possible answers to a) and they are: 1) the URI is relative to the xml:base, and 2) the URI is relative to the document URI. I think arguments can be made for both answers, based on the current specs, though personally I lean towards 1). Both answers have some troublesome implications, though. Let's apply this to an example, to make it easier to discuss: <!-- document URI: http://www.topicmaps.org/xtm/1.0/language.xtm --> <topicMap id="xtm1.0-psi-language" xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink" xml:base="http://www.topicmaps.org/xtm/1.0/"> <topic id="lang-code">[...] </topic> <topic id="aa"> <instanceOf><topicRef xlink:href="#lang-code"/></instanceOf> [...] </topic> [...] The examples in the XML:Base recommendation show quite clearly that the xlink:hrefs are resolved relative to the current xml:base. Look at the hot picks, for example, they are quite obviously relative to the xml:base attribute on the olist element. If that is correct, the URI in the <topicRef> element above has to be "http://www.topicmaps.org/xtm/1.0/#lang-code". If we now return to issue a), and assume that the answer is 2), this means that the URI of the lang-code topic was "http://www.topicmaps.org/xtm/1.0/language.xtm#lang-code" If that is the case the xlink:href will not match the lang-code topic, and an XTM processor will have to create a dummy topic for it. So if 2) is the answer to a) introducing an xml:base attribute into a topic map document is likely to break every single internal <topicRef>, which is why my data model proposal chose approach 1). If we assume that the answer to a) is 1), then the URI of the lang-code topic is "http://www.topicmaps.org/xtm/1.0/#lang-code". In this case the <topicRef> will match the lang-code topic, and all will be well. My interpretation of XTM 1.0 is that 1) is correct. Steve's interpretation was that 2) is correct. From your email it seems that you agree with Steve that 2) is correct. I am unable to find anything in the relevant specifications that clearly states that 1) or 2) is correct, though to me 1) seems the most logical, and it also avoids some nasty problems[1]. (I know there are examples in XTM 1.0 that indicate (very indirectly) that 2) is correct. However, since there are references from normative text to language.xtm and country.xtm, and they are broken under interpretation 2), that doesn't really help.) The reason I think 1) is correct is that avoids topic map breakage when xml:base is introduced, and also that it seems very strange for an element information item to have a [base uri] property, and yet its URI when it has an ID is not to be derived from that property. (The internal link breakage problems arising from this apply to all XML applications, of course.) If the URI were to be derived from something else it also seems strange that that something else is not part of the XML Infoset. Interpretation 1) also has some problematic aspects, in that it means that the URI of an element will not be able to locate it, if you give the URI to a processor that has not already read the document the element appears in. To me this appears to be the lesser evil, though people might reasonably disagree. My conclusion to this particular issue is that the language.xtm and country.xtm topic maps have exposed an ambiguity in the current specifications. This means that reasonable people can have two different opinions on what the PSIs in these documents are meant to be. I was quite convinced that your intention was that these URIs should be "http://www.topicmaps.org/xtm/1.0/#foo", and this was based on the following: - my assumption that 1) was correct, - the presence of the xml:base attribute, which otherwise seemed pointless, since it would break the topic map, - the absence of explicit subjectIndicatorRefs for each topic, which would mean that downloading the *.xtm files and loading them into a topic map processor would under interpretation 2) give them different URIs from their intended PSIs, and - the fact that language-codes were lower-case, and country-codes uppercase, so they wouldn't collide. In other words, under 1) there would be no breakage, under 2) there would be. It didn't seem reasonable to assume that you would insert an xml:base attribute and then interpret it in such a way that your topic maps would break. Regardless of whether 1) or 2) is correct, it seems to me clear that the presence of the xml:base attribute in these documents has great potential for confusion, and also that we need a proper processing model as soon as at all possible. I think this should make it clear why the presence of the xml:base attribute confused me. If you could explain the rationale for introducing it, and also for why you think 2) is correct, I would be much obliged. In my opinion this is a crucial XTM interpretation issue; topic map developers need to know which is the correct choice. --Lars M. [1] A _lot_ of people are going to be unhappily surprised if the introduction of an xml:base attribute into their topic maps causes loads of dummy topics to appear. To Post a message, send it to: xtm-wg@eGroups.com To Unsubscribe, send a blank message to: xtm-wg-unsubscribe@eGroups.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