Fieldmarks

Summary

Proposal owner: Florian Reuter (freuter at novell dot com)

Proposal short name: “fieldmarks” for OASIS OpenDocument.

Requested changes to the ODF Standard

Text changes/additions (please state section numbers): Add section 5.2.3 Fieldmarks.

Fieldmarks are very similar to bookmarks, except that they need to be properly nested. This is achieved by the fact, that a <text:fieldmark-end> does not have a "name" attribute, but instead closes the last opened <text:fieldmark-start> element. The <text:fieldmark> element is short form of <text:fieldmark-start> and <text:fieldmark-end>. Additionally a <text:fieldmark-start> element inside a <text:fieldmark> element must be close by the corresponding <text:fieldmark-end> element inside the parent <text:fieldmark>. Otherwise the <text:fieldmark-start> has to be ignored. A <text:fieldmark-end> inside a <text:fieldmark> without a corresponding <text:fieldmark-start> also inside this <text:fieldmark> have to be ignored, too. A <text:fieldmark> element SHOULD preferably be written instead of start-/end marks.

Every fieldmark can have a name (text:name); similar to the name of text:bookmark elements. They SHOULD be unique; preferably also with the bookmark names. a type (text:type) which allows application to define the type of the fieldmark. a sequence of associated (name, value) pair represented by the <text:param text:name="string" text:value="string"/>. Locked attribute specifies whether the user can edit the content or not.

Fieldmarks along with the field type and field params SHOULD be preserved.

To enable interoperability between ODF processing entities the following types should be used.

Type

Type-name

Parameters

FORMTEXT: Indicates that the range of text given by the fieldmark should be rendered as an form text. Typically this results in a "gray" background color being applied.

vnd.oasis.opendocument.field.FORMTEXT

Description : String

CHECKBOX: A checkbox represents a graphical user interface element that permits the user to make a selection for a certain option.

vnd.oasis.opendocument.field.CHECKBOX

Description : String, Result : "0" or "1"

<define name="paragraph-content" combine="choice">
        <choice>
                <element name="text:fieldmark">
                        <attribute name="text:name">
                                <ref name="string"/>
                        </attribute>
                        <attribute name="text:type">
                                <ref name="namespacedToken"/>
                        </attribute>
                        <attribute name="text:locked">
                                <ref name="boolean"/>
                        </attribute>
            <sequence>
                      <ref name="fieldmark-parameter"/>
                      <zeroOrMore>
                            <ref name="paragraph-content"/>
                      </zeroOrMore>             
            <sequence>
        </element>
                <element name="text:fieldmark-start">
                        <attribute name="text:name">
                                <ref name="string"/>
                        </attribute>
                        <attribute name="text:type">
                                <ref name="namespacedToken"/>
                        </attribute>
                        <attribute name="text:locked">
                                <ref name="boolean"/>
                        </attribute>
                    <ref name="fieldmark-parameter"/>
                </element>
                <element name="text:fieldmark-end">
                </element>
        </choice>
</define>

<define name="fieldmark-parameter">
    <zeroOrMore>
                <element name="text:param">
                        <attribute name="text:name">
                                <ref name="string"/>
                        </attribute>
                        <attribute name="text:value">
                                <ref name="string"/>
                        </attribute>
                </element>
    <zeroOrMore>
</define>

Rationale

Use cases:

Many developers use bookmarks to mark areas of the document which are controlled by special plug-ins. Since bookmarks are not the right tools for this we propose to add a new element to the OpenDocument specification called fieldmarks. Fieldmarks are introduced to clearly differenctiate between user-generated bookmarks and code-generated bookmarks which we call fieldmarks. The main difference to bookmarks is that: * fieldmarks need to be properly nested, * fieldmarks have additional informations, like a type attribute and a sequence of (name, value) pairs which allow applications to store additional information about the content.

There was a question from Patrick Durusau regarding the term "properly nested". I borrowed the term from Cormen/Leiserson/Rivest great book "Introduction to Algorithms" (page 480). I guess the correct formal statement is that the sequence of all <field-start/>, <field-end/> form a Dyck-language.

Alternatives considered:

There is an alternative idea from Bob Jolliffe [http://lists.oasis-open.org/archives/office/200805/msg00079.html] which is very interresting. When I understood correctly his proposal is to introduce a generic marker concept. So introducing the marker concept and removing the bookmark/fieldmarks entirely is an option too. Patrick Durusau has a list] of elements which use the start-/end- encoding too and which could also be superseded by the marker concept.

Impacts

Conformance:

New feature. Older ODF processors will ignore the field tags and display the text. So no content is lost.

Accessibility impact:

No known accessibility issues.

Workflow (to be filled in by TC Chairs)

Category: CategoryNewProposal

Date Proposal initially made: May 5th 2008 [http://lists.oasis-open.org/archives/office/200805/msg00026.html]

Dates Proposal discussed on TC calls: 14 July 2008

Date vote is requested:

Date vote is held:

Results of vote:

Fieldmarks (last edited 2009-08-12 18:04:26 by localhost)