Proposal owner: Michael Brauer
Proposal short name: xml-id
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.
With the new metadata features we have introduced xml:id attributes for several elements. We had already several other attributes which have the type XSD-ID (for example text:id and draw:id attributes), so that we now have the situation that some elements have an xml:id attribute, some element another attribute of type XSD-ID, and some elements even both. This proposal aims to make definitions of XSD-ID attributes consistent again.
The semantics defined by Relax-NG for the XSD-ID datatype (as well as for the XSD-IDREF and XSD-IDREFS datatypes) are purely lexical unless other specifications are normatively referenced that add additional semantics. This is currently not the case for ODF. This proposal aims to add ID semantics to attributes of type XSD-ID to ODF.
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.
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):
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
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.
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.
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.
The description of form:id attribute will be amended analogous to that of anim:id.
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)
This proposal adds requirements for conforming applications regarding the use of attributes of type XSD-ID.
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.
No impact on acccessibility is known.
Workflow (to be filled in by TC Chairs)
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