Summary

Proposal owner: Michael Brauer

Proposal short name: xml-id

Rationale

Notation:

In this proposal, the following notations are used:

xml:id: An xml:id attribute as defined by the W3C xml:id specification.

XSD-ID, XSD-IDREF, XSD-IDREFS: The ID, IDREF and IDREFS datatypes defined by the W3C XML Schema Part 2 specification.

Use cases:

Ulike the XML 1.0 specification, the W3C xml:id specification does not require that an element has only one attribute of type ID. The OASIS Relax NG DTD Compatibility also seems not to require this. Both however is is not relevant, because we are not using DTDs to define the ODF schema, and we are also not using RNG Compatibility to define ID semantics. The RNG specification itself does not define ID semantics, so we do not run into an issue here, too.

That means that the ODF schema is a valid Relax-NG schema even without the changes proposed below. However, without these changes, only the xml:id attributes would get ID semantics. The semantics of the other attributes of type XSD-ID would remain pure lexical.

This proposal adds only semantics to attributes of type XSD-ID. The semantics of attributes of type XSD-IDREF and XSD-IDREFS remain on the level of validation pure lexical. However, the only non-lexical validity constrain that the XML 1.0 specification defines for attributes of type IDREF and IDREFS is that the references IDs do exist. We may add some language for this requirement to all attribute definitions of type XSD-IDREF or XSD-IDREFS. This is not part of this proposal so far.

This proposal does not change the situation regarding validation with jing and msv. In particular, it does not resolve the errors that are reported by jing if it is used without -i option, that is, with RNG DTD Compatibility enabled. It also does not change the validation of the ID semantics, because both validators seem not to support xml-id. jing validates ID semantics only in the DTD compatibility mode. MSV validates ID semantics for all attributes of type ID, regardless of their name.

This proposals follows suggestion from Christian Lippka and Alex Brown.

Alternatives considered:

Rather than using W3C xml:id to add ID semantics, the OASIS Relax NG DTD Compatibility specification may be used to ID semantics. This however leads to ambiguities within ODF's definitions of anyAttListOrElements which are difficult to resolve or may even be non resolvable if xml:id is used.

Requested changes to the ODF Standard

Text changes/additions (please state section numbers):

xml:id

The following elements get an additional xml:id attribute:

anim:audio
anim:command
anim:iterate
anim:par
anim:seq
dr3d:cube
dr3d:extrude
dr3d:rotate
dr3d:sphere
draw:text-box
form:button
form:checkbox
form:combobox
form:date
form:file
form:fixed-text
form:formatted-text
form:frame
form:generic-control
form:grid
form:hidden
form:image
form:image-frame
form:listbox
form:number
form:password
form:radio
form:text
form:textarea
form:time
form:value-range
text:changed-region

anim:id

The following text will be added to the description of the anim:id attribute:

The anim:id attribute is deprecated in favor of xml:id.

Applications that read documents shall ignore this attribute if there is an xml:id existing for the same element. If no xml:id attribute is existing for the same element, then the anim:id attribute should be processed as it were an xml:id attribute.

Applications that write documents may still write anim:id attributes in addition to xml:id attributes. An element shall not have an anim:id attribute if there is no xml:id attribute existing for the same element. The value of the anim:id attribute must equal the value of the xml:id attribute.

draw:id

The description of draw:id attribute will be amended analogous to that of anim:id for the following elements:

dr3d:cube
dr3d:extrude
dr3d:rotate
dr3d:sphere
dr3d:scene
draw:caption
draw:circle
draw:connector
draw:control
draw:custom-shape
draw:ellipse
draw:frame
draw:g
draw:line
draw:measure
draw:page
draw:page-thumbnail
draw:path
draw:polygon
draw:polyline
draw:rect
draw:regular-polygon
office:annotation

Note: There is also an draw:id attribute for the draw:glue-point elements. Its description and datatype will not be changed.

text:id

The description of text:id attribute will be amended analogous to that of anim:id for the following elements:

text:changed-region
text:h
text:p
draw:text-box

The text:id attribute of the text:list will be removed, since it has been added for ODF 1.2 only.

Note: There is also an text:id attribute for the following elements:

text:alphabetical-index-mark-end
text:alphabetical-index-mark-start
text:note
text:toc-mark-end
text:toc-mark-start
text:user-index-mark-end
text:user-index-mark-start

These attributes are not of type XSD-ID. Their description and datatypes will not be changed.

form:id

The description of form:id attribute will be amended analogous to that of anim:id.

Schema changes/additions:

The datatype of the following attributes will be changed to NCName:

anim:id (all occurrences)

draw:id, where listed above

text:id, where listed above

form:id (all occurrences)

Impacts

Conformance:

This proposal adds requirements for conforming applications regarding the use of attributes of type XSD-ID.

Backwards compatibility:

This proposal allows to store documents that are not backward compatible to ODF 1.0/1.1. This does not only effect features that are new in ODF 1.2, but also existing features like animations or change tracking. However, this proposal still allows to store documents in way that is backward compatible with ODF 1.0 and 1.1 and provides guidelines how backward compatibility can be achieved.

Accessibility impact:

No impact on acccessibility is known.

Workflow (to be filled in by TC Chairs)

Category: CategoryIntegratedProposal

Date Proposal initially made: 2008-06-10

Dates Proposal discussed on TC calls: 4 August 2008

Date vote is requested: 2008-08-21

Date vote is held: 2008-09-22

Results of vote: Approved

Version in which this proposal has been integrated: ODF 1.2 draft 7-9

proposal:xml-id (last edited 2009-08-12 18:04:24 by localhost)