Version 12 (modified by 14 years ago) (diff) | ,
---|
User annotations
Annotation tools
- http://edutechwiki.unige.ch/en/Text_annotation - Different information about annotations
- http://www.shiftspace.org/ - Firefox plugin - annotate and highlight text
- http://www.flipbit.co.uk/jquery-image-annotation.html# - Image annotation JQUERY
- http://annotation.semanticweb.org/tools/ - List of tools
eXist Interface
External user annotations (internal TEI user annotations: see here) 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; it consists of 3 parts:
- value: if operation is create or update: the new object (e.g. <note>This is an annotation of Andy</note>)
- attributes
To maintain a user annotation "at the HTML side" one needs the XPath identifier of the XML page node at which the annotation should be created/updated/deleted. This identifier is displayed by the parameter "options=withXmlNodeIds" in the interface function /mpdl/interface/page-fragment.xql. Then the output HTML document page contains an additional attribute "xmlNodeId" in all HTML nodes which are XML nodes (e.g. <span class="s" xmlNodeId="/TEI[1]/text[1]/body[1]/p[1]/s[1]">This is the first sentence of the first paragraph.</s>)
Implementation
- Test-Version finished (Java, XSL script)
- To Do
- Identify further user requirements
- Java: perform accepetance / user test
- Display of a document page with external objects and with XML node ids (insertExternalElements.xsl): full redesign and new implementation
- Bug: at one position there could be only one external user annotation so far (bug in XSL script)
Open questions
- Versioning of annotations
- Discussion / Blog of each document page
Examples
Example document
- Test document: Display of page 1 with XPath identifiers for all XML nodes
- Test document: Display of page 2 with external user annotations
Read annotations
http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/interface/external/object.xql? operation=read& type=element& object=<object documentId="/tei/en/Test_1789.xml" xpointer="id('page2')"></object>
Create annotation
http://mpdl-system.mpiwg-berlin.mpg.de/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>
Test: please don't click on: Create annotation
Update annotation
http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/interface/external/object.xql? operation=update& 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>
Test: please don't click on: Update annotation
Delete annotation
http://mpdl-system.mpiwg-berlin.mpg.de/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>
Test: please don't click on: Delete annotation