Ticket #639 (new enhancement)
Linked data style definition lookup
| Reported by: | clange | Owned by: | cdavid |
|---|---|---|---|
| Priority: | major | Milestone: | zzz Future zzz |
| Component: | JOBAD | Version: | v0.1.3 |
| Keywords: | Cc: | vzholudev, frabe, nzhiltsov | |
| Blocked By: | Blocking: | ||
| Due to close: | YYYY/MM/DD | Include in GanttChart: | no |
| Dependencies: | Due to assign: | YYYY/MM/DD |
Description (last modified by clange) (diff)
We will get steps 2 and 3 for free once #648 is implemented. As we have proprietary non-linked-data-compliant ways of definition lookup in both TNTBase and MMT, this has a lower priority. But it maybe interesting to show third parties that we can also do it in a compliant way.
Summarizing my previous mails on that: JOBAD should support definition lookup in a linked data style. Which means:
- construct a URI for the symbol. When we have e.g. <OMS cdbase="http://tntbase.mathweb.org/gencs/dmath" cd="sets-introduction" name="emptyset"/>, this is just OpenMath?'s way of writing a URI cdbase / cd # name, i.e. http://tntbase.mathweb.org/gencs/dmath/sets-introduction#emptyset. A cdbase needs not be given on every OMS, it can be given on any parent element from the OpenMath? namespace. The (ancestor-or-self::om:*/@cdbase)[1] XPath expression covers all cases. I.e. of all @cdbase attributes on the current element and its ancestor elements, take the closest one (compare the scoping of XML namespaces). When there is no such attribute, the fallback value is http://www.openmath.org/cd. You can start implementing this now, but it depends on #640 to work properly in our TNTBase-generated documents.
- treat that URI as a URL and download content from it, requesting the application/xhtml+xml MIME type. (Seems that an XMLHttpRequests by default requests that correctly.)
- if the initial URI contained a hash, take everything after the first hash to be the "fragment ID" (in our example "emptyset"). Extract that fragment from the retrieved XML. getElementById should work.
Change History
Note: See
TracTickets for help on using
tickets.
