- 1 What Are XForms Annotations?
- 2 Summary of Proposed XForms Addition
- 3 Relationship to other W3C Standards
- 4 Definitions
- 5 Use Cases
- 6 Examples of Annotation Editors in the Wild
- 7 Media Types
- 8 References
- 9 Key Issues
What Are XForms Annotations?
Within XForms applications there is frequently a need to edit complex content within an XForms textarea element. In a simple use case, this can be simply adding simple formatting markup elements such as bold or italics to the text content of an element. A more complex use case might consist of adding TEI annotations that link person names, dates or geo-locations to controlled vocabularies.
Our hope is that by adding a small number of "Annotation configuration elements" within the textarea element that XForms editors would permit the editing of complex content within a textarea.
This document is a very preliminary discussion about how XForms could be extended to include these annotation functions.
The following are some primary Use Cases that we will discuss. Note that these use cases focus on What will occur but do not discuss how the standard should be implemented.
There seems to be a general consensus among many XForms implementations to use the existing mediatype attribute of the XForms textarea element to specify the type of annotation that will be used. This analysis looks at this proposed recommendation and looks at other possible attributes.
Summary of Proposed XForms Addition
By adding two additional attributes to the XForms textarea element we can permit a higher level of interoperability between XForms applications. In summary we recommend that two additional attributes to the textarea element are:
mediatype - the mime type of the text element
For example if the textarea has HTML content the textarea element may be:
<xf:textarea mediatype="text/html"> </xf:textarea>
If the user is annotating TEI text the mime type would be:
<xf:textarea mediatype="application/tei+xml"> </xf:textarea>
schema - a schema URI associated with with the elements within this text area
Relationship to other W3C Standards
The focus of this XForms extension module is to standardize the way that annotation editors are configured. This is also related to other systems that may want to add annotations such as RDFa annotations. Because our focus is the editing process and the configuration of the editing system we will not be concerned about the standardization of the tags within a xf:textarea, only the process of configuring tools to edit these annotations.
We will use the following definitions in our further analysis:
An Annotation Context or context is the containing element that the annotation applies. For example a simple XForms xf:textarea might be a rich-text-editor within a form.
An Annotator Object or annotator is the specific set of information used to annotate at an insertion point or over the selected text.
An Annotator Configuration or configuration is a list of annotators that can be used within a given context such as a textarea element. In general a configuration is a list of the named annotators that can be used within a context.
An Annotation Profile or profile is a named grouping of elements that are traditionally used to annotate text. For example the html-tiny might be a profile of a tiny subset of HTML elements.
A Toolbar will be a list of usually small icons that is frequently displayed above a context such as a textarea.
- Annotation Use Case Simple Content Wrap
- Annotation Use Case Simple Content Wrap With Parameters
- Annotation Use Case Simple Content Wrap With Server-Side Selection List
- Annotation Use Case Complex Content
In addition to these, there are also the Insert which will insert XML at the insertion point, deletes which will remove a selected annotation and edit that will edit the selected annotation. This behavior is assumed and may not impact the way that the annotations are configured.
Examples of Annotation Editors in the Wild
There are many organizations that have already extended both XForms and HTML editors to include the ability to add annotations.
The Orbeon Forms enables HTML rich-text content by allowing the XForms author to add the mediatype attribute to a textarea control. If this is added, the Orbeon forms system automatically makes the textarea a rich-text editing component.
Note that eXSLTForms is designed to work with may different rich-text editors such as CKEdit.
Kubera forms has also been extended to include TEI editing.
- BetterForm also has support for rich text editors. Like Orbeon, they use the "mediatype" attribute to indicate to the form that a rich-text editor is to be bound to the xf:textarea control.
For example to enable HTML content within a textarea you use the following"
The XSmiles XForms editor also supports XHTML editing.
I also discussed the options with another developer of a commercial XForms product that wanted to remain anonomyus. They indicated that they intended to support the media-type attribute.
- Wolfgang Meier has been working on extending the WYMeditor. WYMEditor is a JQuery Rich text editor to also edit TEI documents. Need link... ?
For TEI the type is:
- Discussion in April 20th XForms Working Group Meeting
- TEI Annotator Demo
- TEI Annotator Docs Including User Guide
- The Open Annotation Collaboration has several use-cases.
- The March 2011 Workshop has links to 17 Annotation Use Cases
- Intelligent use of Annotation Defaults - convention over configuration
- Description of Annotators - how do we describe all the annotators within a context?
- Annotation Toolbar Configuration - how do we describe presentation elements for annotation controls.
- Limiting Annotation Context - can we scale this to include a full word processor with spell check and versioning? What about annotating images and sound? Is this a beast that can be tamed?