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

Is Part 1, Section 16.2 correct about style resolution?

    XMLWordPrintable

    Details

    • Resolution:
      Hide

      In 16.2, change the following paragraph

      For styles where the style:family attribute 19.478 has the value text, applied to an descendant elements of a paragraph which defines character content 6.1.1, the paragraph style applied to the paragraph containing those elements is searched for the formatting property. If the formatting property is not found, the parent styles, if any, of the style applied to the containing paragraph are searched until the formatting property is found or a style is found with no parent style.

      to

      For styles with family text which are applied to elements which are contained in another element that specifies a style with family text, the search continues within the text style that is applied to the nearest ancestor element that specifies a style with family text, and continues in its parent styles.

      For styles with family text which are applied to elements which are contained in a paragraph element 6.1.1, the search continues within the paragraph style that is applied to the paragraph element, and continues in its parent styles.

      Show
      In 16.2, change the following paragraph — For styles where the style:family attribute 19.478 has the value text, applied to an descendant elements of a paragraph which defines character content 6.1.1, the paragraph style applied to the paragraph containing those elements is searched for the formatting property. If the formatting property is not found, the parent styles, if any, of the style applied to the containing paragraph are searched until the formatting property is found or a style is found with no parent style. — to — For styles with family text which are applied to elements which are contained in another element that specifies a style with family text, the search continues within the text style that is applied to the nearest ancestor element that specifies a style with family text, and continues in its parent styles. For styles with family text which are applied to elements which are contained in a paragraph element 6.1.1, the search continues within the paragraph style that is applied to the paragraph element, and continues in its parent styles. —

      Description

      As posted by Jos on mailing list:

      Today I was reading paragraph 16.2 of OpenDocument-v1.2-cd05-part1-editor-
      revision_01.odt.

      I tried to deduce how to resolve certain properties for certain ODF fragments.

      <text text:style-name='A'>
      <text:span text:style-name='B'>
      <text:span text:style-name='C'>
      Hello
      </text:span>
      </text:span>
      </text>

      Assume that styles A, B and C have no parent styles and both A and B determine
      fo:font-size at 10 and 20 respectively. If I follow the instructions in 16.2,
      I would conclude that 'Hello' should be shown with font-size 10, since the
      instructions there say that if the style on the element does not define a
      property, next one should look at the style for the containing paragraph,
      thereby skipping style 'B'. That seems wrong to me.

      This is the relevant instruction:
      "For styles where the style:family attribute 19.478 has the value text,
      applied to an descendant elements of a paragraph which defines character
      content 6.1.1, the paragraph style applied to the paragraph containing those
      elements is searched for the formatting property."

        Attachments

          Activity

            People

            • Assignee:
              patrick Patrick Durusau
              Reporter:
              rcweir Robert Weir (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: