Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-3317

ODF 1.2 Part 1 5.5.2 <text:changed-region> ID attribute inconsisently available

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Applied
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: ODF 1.2 CD 05
    • Fix Version/s: ODF 1.2 CD 06
    • Labels:
      None
    • Environment:

      This defect applies since at least ODF 1.2 Part 1 CD04. This issue is presented in terms of ODF 1.2 CD05 Part 1.

    • Proposal:
      Hide

      1. In the ODF 1.2 Schema definition for text-changed-region-attr,

      1.1 replace

      """
      <define name="text-changed-region-attr">
      <choice>
      <ref name="text-changed-region-text-id"/>
      <group>
      <ref name="xml-id"/>
      <optional>
      <ref name="text-changed-region-text-id"/>
      </optional>
      </group>
      </choice>
      </define>
      """

      with

      """
      <define name="text-changed-region-attr">
      <choice>
      <attribute name="text:id">
      <ref name="ID" />
      </attribute>
      <interleave>
      <ref name="xml-id"/>
      <optional>
      <attribute name="text:id">
      <ref name="NCName" />
      </attribute>
      </optional>
      </interleave>
      </choice>
      </define>
      """

      1.2 and delete the definition for text-changed-region-text-id.

      (If RNG validators can't handle <interleave> in this case, go back to using <group> instead.)

      2. In section 19.811.5:<text:changed-region> in text:id usage, replace the entire text of the section with the following:

      """
      The text:id attribute specifies the ID value for the element in the absence of an xml:id attribute. If there is an xml:id attribute on the element, any text:id attribute shall have the same NCName value as the xml:id attribute.

      The ID value is used in text:change-id IDREF values to refer to the particular <text:changed-region> element.

      The text:id attribute is deprecated.

      Note: The text:id attribute may be present alone in <text:changed-region> elements produced in conformance with previous versions of the OpenDocument Format. Preservation of the attribute along with the preferred use of xml:id might be useful in situations where backwards compatibility is being maintained.
      """

      Show
      1. In the ODF 1.2 Schema definition for text-changed-region-attr, 1.1 replace """ <define name="text-changed-region-attr"> <choice> <ref name="text-changed-region-text-id"/> <group> <ref name="xml-id"/> <optional> <ref name="text-changed-region-text-id"/> </optional> </group> </choice> </define> """ with """ <define name="text-changed-region-attr"> <choice> <attribute name="text:id"> <ref name="ID" /> </attribute> <interleave> <ref name="xml-id"/> <optional> <attribute name="text:id"> <ref name="NCName" /> </attribute> </optional> </interleave> </choice> </define> """ 1.2 and delete the definition for text-changed-region-text-id. (If RNG validators can't handle <interleave> in this case, go back to using <group> instead.) 2. In section 19.811.5:<text:changed-region> in text:id usage, replace the entire text of the section with the following: """ The text:id attribute specifies the ID value for the element in the absence of an xml:id attribute. If there is an xml:id attribute on the element, any text:id attribute shall have the same NCName value as the xml:id attribute. The ID value is used in text:change-id IDREF values to refer to the particular <text:changed-region> element. The text:id attribute is deprecated. Note: The text:id attribute may be present alone in <text:changed-region> elements produced in conformance with previous versions of the OpenDocument Format. Preservation of the attribute along with the preferred use of xml:id might be useful in situations where backwards compatibility is being maintained. """
    • Resolution:
      Hide

      Apply changes of

      http://lists.oasis-open.org/archives/office/201008/msg00316.html

      to the schema to align it with the requirements stated in the prose for the *:id attributes.

      Show
      Apply changes of http://lists.oasis-open.org/archives/office/201008/msg00316.html to the schema to align it with the requirements stated in the prose for the *:id attributes.

      Description

      1. Every <table:changed-region> attribute requires an attribute of type ID in order to be referenced by the IDREF text:change-ide attribute in one or more change marks elements.

      However, with the current RNG Schema, there is no <table:changed-region> attribute with a value of type ID when there is no xml:id attribute. That is because the text:id attribute, which must be present when there is no xml:id attribute, has a value of type NCName, not type ID.

      2. The definition for text:id and xml:id usage in this case does not correspond to what is required to satisfy the requirements for use of ID in accordance with the [XML-ID]. Those conditions surely have precedence over any supplementary conditions in the text of ODF 1.2. In particular, the text of section 19.811.5 specifies that there must always be an xml:id when there is a text:id, but that contradicts the schema, which makes explidit allowance for a standalone text:id attribute on a <text:changed-region> attribute.

      3. It is not clear how backward compatibility is served by the peculiar requirement to have xml:id and text:id have the same value when both are present. This presumes that a down-level consumer will ignore the xml:id and not consider there to be a violation of [XML-ID] by the apparent appearance of to ID-valued attributes with the same value (according to the down-level schema plus [XML-ID]).

      [NOTE: There are other places where the same device appears to be attempted with regard to introduction of an xml:id attribute that pre-empts the type of another attribute formerly (and in isolation) having a value of type ID. Similar measures may be appropriate for those cases. This issue does not address those potential cases.]

        Attachments

          Activity

            People

            • Assignee:
              michael.brauer Michael Brauer (Inactive)
              Reporter:
              orcmid Dennis Hamilton (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: