From: Florian G. H. <f.g...@gm...> - 2001-08-08 18:17:51
|
Hi! [Gerd] | Seems an interesting approach to me and it has to be evaluated in a real | application. So, we should give it a try. | | A technical issue: How do you map the graph structure into a tree ? E.g. | if I want the type of an association, which referenced by an ID in XTM, do | you start than an XPath query ? Precisely. One would then extract the desired topic ID from the xlink:href attribute of the <topicRef> inside the <instanceOf>, and create the XPath expression using that. So if there's an association whose <instanceOf> refers to a topic with the id "foobar" in the current topic map (xlink:href="#foobar"), the XPath expression becomes "/topicMap/topic[@id = 'foobar']". This could also be used for trickier problems such as finding all <variant>s whose <parameters> refer to a certain topic, as in "//variant[parameters/topicRef/@xlink:href = '#foobar']", thereby scanning the DOM tree recursively for matching elements. Or just scan for whatever refers to a certain topic, as in "//topicRef[@xlink:href = 'foobar']". Later, -- Florian |