From: Lars H. <he...@se...> - 2008-07-02 16:32:44
|
Hi Stefan, > So do we have to provide the parse(tmsystem,input) for xtm 1.0 ? No, not necessarily; parsing XTM 1.0 not very different from XTM 2.0, first, the document IRI is used. If you find a xml:base in the XTM 1.0 file, that xml:base is used. Note, that a XTM 1.0 file may contain any number of xml:base attributes. You have to take care that you use the *current* xml:base. So, it would be pretty okay if the user wants to override the (initial) document IRI, but it may not be used for all Topic Maps constructs, because the xml:base overrides the document IRI. Yes, that sucks, and this was one of the reasons why xml:base is not used in XTM 2.0. :) Example: If I have a topic map "mymap.xtm" and I place it into the directory /home/lars/maps, the document IRI would be <file:///home/lars/maps/mymap.xtm> but it would be okay, if I dictate that the document IRI <http://www.semagia.com/maps/mymap.xtm> should be used. But even if I dictate that, I cannot assume that every local id is resolved against that IRI, because xml:base may override my document IRI with i.e. <http://tinytim.sf.net/>, so some topics may use <http://tinytim.sf.net/> as base IRI. Complicated stuff. :) But XTM 2.0 is easier to read and to serialize, maybe you want to start with XTM 2.0 and postpone XTM 1.0. Best regards, Lars -- Semagia <http://www.semagia.com> |