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-2235

Part 3 section 6.3.1 and manifest schema: datatype namespacedToken incorrectly defined

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Applied
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ODF 1.2 Part 3 CD 1
    • Fix Version/s: ODF 1.2 Part 3 CD 2
    • Labels:
      None
    • Environment:
    • Proposal:
      Hide

      1. Replace the text in Part 3 section 6.3.1 with

      "A namespacedToken value is an [xmlschema-2] QName that matches the definition of PrefixedName in §4 of [xml-names]."

      2. In the Manifest Schema, replace the definition of namespacedToken by

      <define name="namespacedToken">
      <data type="QName">
      <param name="pattern">[\c-[:]]:[\c-[:]]</param>
      </data>
      </define>

      using a proper regular expression that requires the QName to have a ":" character so that only PrefixedNames work. (The regexp shown is in the form that works as an [xmlschema-2] restriction pattern where the "\c" escape refers to any XML Name character.)

      Show
      1. Replace the text in Part 3 section 6.3.1 with "A namespacedToken value is an [xmlschema-2] QName that matches the definition of PrefixedName in §4 of [xml-names] ." 2. In the Manifest Schema, replace the definition of namespacedToken by <define name="namespacedToken"> <data type="QName"> <param name="pattern">[\c- [:] ] :[\c- [:] ] </param> </data> </define> using a proper regular expression that requires the QName to have a ":" character so that only PrefixedNames work. (The regexp shown is in the form that works as an [xmlschema-2] restriction pattern where the "\c" escape refers to any XML Name character.)
    • Resolution:
      Hide

      Adapt definition and description of namespacedToken to that of part 1. Add regular expression to schema definition of "namespacedToken" that restricts its value space to prefixed names.

      Show
      Adapt definition and description of namespacedToken to that of part 1. Add regular expression to schema definition of "namespacedToken" that restricts its value space to prefixed names.

      Description

      In 6.3.1:

      "A namespaced token is a token id that makes use of the XML namespace mechanism for modularization purposes."

      is vague and uninformative. The form is not clear and the semantic conditions that apply are not stated (nor are modularization purposes explained and their achievement described).

      In the Manifest Schema, the definition

      <define name="namespacedToken">
      <data type="string">
      <param name="pattern">[0-9a-zA-Z_]:[0-9a-zA-Z._\-]</param>
      </data>
      </define>

      is not appropriate for an attribute whose values may be a QualifiedName and which should be Namespace Well-Formed. The pattern does not properly allow NCName for the prefix and for the local name.

      See also OFFICE-2157 where this problem is corrected for ODF 1.2 Part 1.

      The only use of namespaceToken is as one of the alternative values of a manifest:preferred-view-mode attribute (section 3.8.11). This attribute is new for ODF 1.2 manifest files and their is no impact of a remedy on backward-compatibility with earlier versions of ODF.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: