Changes between Version 2 and Version 3 of schema/xpointer


Ignore:
Timestamp:
Feb 21, 2011, 2:29:21 PM (13 years ago)
Author:
jwillenborg
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • schema/xpointer

    v2 v3  
    4848  * <p>The Ramones started up in March 1974 (see <note xlink:href="http://mpdl.mpiwg-berlin.mpg.de/music/ramones/ramones_2004.xml#xpointer((id('page6')/tei[1]/text[1]/body[1]/chap[1]/p[1]/s[1]/range(1.22, 1.34))">page 6, sentence 1, character 22 to 32</note>).</p>
    4949
    50 External user annotations of documents are stored relative to document pages by mapping XPointer points/ranges to an identifier in a combination of document identifier, page number, element xpath expression, and a point/range expression. Example:
     50External user annotations of documents are stored relative to document pages by mapping XPointer page points/ranges to an internal identifier as a combination of document identifier, page number, element xpath expression, and a point/range expression. Example:
    5151* before the first sentence on page 6: /music/ramones/ramones_2004.xml (or /permanent/library/471122KK), page6, /tei[1]/text[1]/body[1]/chap[1]/p[1]/s[1], point(.0)
    5252* after the first sentence on page 6: /music/ramones/ramones_2004.xml (or /permanent/library/471122KK), page6, /tei[1]/text[1]/body[1]/chap[1]/p[1]/s[1], point(.1)
    5353* from character 22 to 34 in the first sentence of page 6: /music/ramones/ramones_2004.xml (or /permanent/library/471122KK), page6, /tei[1]/text[1]/body[1]/chap[1]/p[1]/s[1], range(1.22, 1.34)
     54
     55==== Discussion ====
     56
     57* document identifier: a persistent identifier of a document
     58  * http://mpdl.mpiwg-berlin.mpg.de/music/ramones/ramones_2004.xml
     59    * Advantages
     60      * intuitive
     61      * easy to retrieve
     62      * compatible to XLink
     63      * REST like
     64    * Disadvantages
     65      * could be used once more (no id any more)
     66  * http://mpdl.mpiwg-berlin.mpg.de/permanent/library/471122KK
     67    * Advantages
     68      * persistent id (could be used exactly one time)
     69      * already used in Echo-System and library
     70    * Disadvantages
     71      * counterintuitive
     72      * not easy to retrieve
     73* page number
     74  * http://mpdl.mpiwg-berlin.mpg.de/music/ramones/ramones_2004.xml#xpointer((id('page6'))
     75    * Advantages
     76      * compatible to XLink/XPointer
     77      * could be interpreted also without <pb id="page6"/> in the document (through getFragment implementation)
     78      * REST like
     79    * Disadvantages
     80      * if in XML document <pb/> elements are inserted or deleted afterwards many old XPointer links are broken
     81  * http://mpdl.mpiwg-berlin.mpg.de/music/ramones/ramones_2004.xml?page=6
     82    * Advantages
     83      * well-nigh compatible to XLink/XPointer
     84      * could be interpreted also without <pb id="page6"/> in the document (through getFragment implementation)
     85      * REST like
     86    * Disadvantages
     87      * if in XML document <pb/> elements are inserted or deleted afterwards many old XPointer links are broken
     88      * two parameters necessary (page, xpointer)
     89* element identifier
     90  * xpath expression: /tei[1]/text[1]/body[1]/chap[3]/p[1]/s[2]
     91    * Advantages
     92      * could be generated dynamically for the XML page
     93      * intuitive
     94      * full compatible to XLink/XPointer
     95      * easy to retrieve
     96      * implementation is easy and consistent (through saxon:path)
     97    * Disadvantages
     98      * if in XML document elements are inserted, updated or deleted afterwards many old XPointer links are broken
     99      * relative long string
     100  * node id: 1.1.1.3.1.2
     101    * Advantages
     102      * could be generated dynamically for the XML page
     103      * intuitive
     104      * compatible to XLink/XPointer
     105      * easy to retrieve
     106    * Disadvantages
     107      * if in XML document elements are inserted, updated or deleted afterwards many old XPointer links are broken
     108  * id attribute in XML document: <s id="47114711">...</s>
     109    * Advantages
     110      * if in XML document elements are inserted, updated or deleted afterwards only old XPointer links with deleted elements are broken
     111      * compatible to XLink/XPointer
     112    * Disadvantages
     113      * through upload process the document has to be modified: for each element in XML document an id attribute has to be generated, also implementation is more complex
     114      * if a user uses an id attribute already in his document but not consistent these id attributes have to be replaced by a new consistent id (not easy to implement)
     115      * the document size is bigger with all these id attribute values
     116      * the id is not intuitive
     117  * special id attribute in XML document: <s xmlNodeId="47114711">...</s>
     118    * Advantages
     119      * user could use his own id attribute in document as he like
     120      * if in XML document elements are inserted, updated or deleted afterwards only old XPointer links with deleted elements are broken
     121      * compatible to XLink/XPointer
     122    * Disadvantages
     123      * through upload process the document has to be modified: for each element in XML document an xmlNodeId attribute has to be generated, also implementation is more complex
     124      * the document size is bigger with all these id attribute values
     125      * the id is not intuitive
     126* point/range expression
     127  * point(.0) or range(1.22, 1.34)
     128    * Advantages
     129      * pointers could point to a text portion, is partly already implemented
     130    * Disadvantages
     131
     132
     133==== Selection / Solution ====
     134* document identifier
     135  * http://mpdl.mpiwg-berlin.mpg.de/permanent/library/471122KK
     136* page number
     137  * http://mpdl.mpiwg-berlin.mpg.de/music/ramones/ramones_2004.xml#xpointer((id('page6'))
     138* element identifier (choice between these 2 best possible solution)
     139  * xpath expression: /tei[1]/text[1]/body[1]/chap[3]/p[1]/s[2]
     140  * special id attribute in XML document: <s xmlNodeId="47114711">...</s>
     141* point/range expression
     142  * point(.0) or range(1.22, 1.34)
     143
     144