wiki:eXist-interface/annotations

Version 4 (modified by jwillenborg, 13 years ago) (diff)

--

eXist Interface: Maintenance of user annotations

User annotations are maintained by the interface function /mpdl/interface/external/object.xql. This function has 3 parameters:

  • operation (possible values: read, create, update, delete)
  • type (possible values: element, query)
  • object (see examples below)
    • attributes
      • uid: user id (normally email address) of the operation (e.g. andy@…)
      • documentId: the eXist document identifier (e.g. /tei/en/Test_1789.xml)
      • xpointer: the xpointer to the position in that document (e.g.: id('page2')/TEI[1]/text[1]/body[1]/p[1]/s[3]/point(4)); see XPointer specification
    • value: if operation is create or update: the new object (e.g. <note>This is an annotation of Andy</note>)

Examples

Example document

Test document with user annotations

Read annotations

  http://mpdl-test.mpiwg-berlin.mpg.de:30030/mpdl/interface/external/object.xql?
    operation=read&
    type=element&
    object=<object documentId="/tei/en/Test_1789.xml" xpointer="id('page2')"></object>

Read annotations

Create annotation

  http://mpdl-test.mpiwg-berlin.mpg.de:30030/mpdl/interface/external/object.xql?
    operation=create&
    type=element&
    object=<object uid="andy@mpiwg-berlin.mpg.de" documentId="/tei/en/Test_1789.xml" xpointer="id('page2')/TEI[1]/text[1]/body[1]/p[1]/s[3]/point(4)"><note>This is an annotation of Andy</note></object>

Create annotation

Delete annotation

  http://mpdl-test.mpiwg-berlin.mpg.de:30030/mpdl/interface/external/object.xql?
    operation=delete&
    type=element&
    object=<object uid="andy@mpiwg-berlin.mpg.de" documentId="/tei/en/Test_1789.xml" xpointer="id('page2')/TEI[1]/text[1]/body[1]/p[1]/s[3]"></object>

Delete annotation

Limitations

  • Interface
    • Java: no real user test done
    • Display of a document page with external objects (insertExternalElements.xsl): full redesign and new implementation
  • Bugs
    • at one position there could be only one external user annotation so far (bug in XSL script)