Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: ODF 1.5
    • Component/s: None
    • Labels:
      None
    • Proposal:
      Hide

      Text changes/additions (compared to ODF 1.3):

      6.1.11 <text:content-control> (new section)

      The <text:content-control> element represents portions of text that have an inline content control attached.

      Allowed attributes: text:showing-place-holder, text:checkbox, text:checked, text:checked-state, text:unchecked-state, text:picture, text:date, text:date-format, text:date-rfc-language-tag, text:current-date.

      Allowed child elements: <text:list-item> (0 or more) and all elements from the paragraph-content-or-hyperlink define.

      6.1.12 <text:list-item> (new section)

      To be used as a child element of the <text:content-control> section, this element allows specifying display-text - value pairs, providing a list of choices for the user when selecting an item from a dropdown.

      20.436 text:showing-place-holder (new section)

      Specifies if the content control is currently showing a placeholder text or not. An editor may want to e.g. pre-select text when clicking into the content control in case the content control is currently showing placeholder text.

      20.437 text:checkbox (new section)

      Specifies if the content control shall only contain a single Unicode character, representing and enabled or disabled state.

      20.438 text:checked (new section)

      Specifies if the checkbox content control is checked or unchecked.

      20.439 text:checked-state (new section)

      Specifies that an editor should change the text of the content control to this Unicode character when the checkbox is marked as checked.

      20.440 text:unchecked-state (new section)

      Specifies that an editor should change the text of the content control to this Unicode character when the checkbox is marked as unchecked.

      20.441 text:picture (new section)

      Specifies that the content control shall only contain a single as-char anchored image, representing a formatted placeholder, to be replaced with an actual picture on interaction.

      20.442 text:date (new section)

      Specifies that the content control shall contain a formatted and localized date. An editor may want to show a date picker to help the user.

      20.443 text:date-format (new section)

      When selecting the day for a date content control, format the selected day using this format string.

      20.444 text:date-rfc-language-tag (new section)

      When formatting a day of a date content control, use this language tag when interpreting the date format string.

      20.445 text:current-date (new section)

      When presenting a date picker for a date content control, default to this date when showing the date picker.

      20.446 text:display-text (new section)

      This attribute is meant to be used with the <text:list-item> element, to provide a human-friendly description of a list item.

      20.447 text:value (new section)

      This attribute is meant to be used with the <text:list-item> element, to provide a machine-readable description of a list item.

      Schema changes/additions

        <rng:define name="paragraph-content" combine="choice">
          <rng:element name="loext:content-control">
            <rng:optional>
              <!-- default value: false -->
              <rng:attribute name="loext:showing-place-holder">
              <rng:ref name="boolean"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <!-- default value: false -->
              <rng:attribute name="loext:checkbox">
              <rng:ref name="boolean"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <!-- default value: false -->
              <rng:attribute name="loext:checked">
              <rng:ref name="boolean"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <rng:attribute name="loext:checked-state">
              <rng:ref name="string"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <rng:attribute name="loext:unchecked-state">
              <rng:ref name="string"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <!-- default value: false -->
              <rng:attribute name="loext:picture">
              <rng:ref name="boolean"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <!-- default value: false -->
              <rng:attribute name="loext:date">
                <rng:ref name="boolean"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <rng:attribute name="loext:date-format">
                <rng:ref name="string"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <rng:attribute name="loext:date-rfc-language-tag">
                <rng:ref name="language"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <rng:attribute name="loext:current-date">
                <rng:ref name="string"/>
              </rng:attribute>
            </rng:optional>
            <rng:zeroOrMore>
              <rng:element name="loext:list-item">
                <rng:attribute name="loext:display-text">
                  <rng:ref name="string"/>
                </rng:attribute>
                <rng:attribute name="loext:value">
                  <rng:ref name="string"/>
                </rng:attribute>
              </rng:element>
            </rng:zeroOrMore>
            <rng:zeroOrMore>
              <rng:ref name="paragraph-content-or-hyperlink"/>
            </rng:zeroOrMore>
          </rng:element>
        </rng:define>
      

      In other words, allow <text:content-control> as a new child element for
      headings/paragraph, similar to <text:meta>, but with several attributes and
      child elements, each with their defined meaning.

      Show
      Text changes/additions (compared to ODF 1.3): 6.1.11 <text:content-control> (new section) The <text:content-control> element represents portions of text that have an inline content control attached. Allowed attributes: text:showing-place-holder , text:checkbox , text:checked , text:checked-state , text:unchecked-state , text:picture , text:date , text:date-format , text:date-rfc-language-tag , text:current-date . Allowed child elements: <text:list-item> (0 or more) and all elements from the paragraph-content-or-hyperlink define. 6.1.12 <text:list-item> (new section) To be used as a child element of the <text:content-control> section, this element allows specifying display-text - value pairs, providing a list of choices for the user when selecting an item from a dropdown. 20.436 text:showing-place-holder (new section) Specifies if the content control is currently showing a placeholder text or not. An editor may want to e.g. pre-select text when clicking into the content control in case the content control is currently showing placeholder text. 20.437 text:checkbox (new section) Specifies if the content control shall only contain a single Unicode character, representing and enabled or disabled state. 20.438 text:checked (new section) Specifies if the checkbox content control is checked or unchecked. 20.439 text:checked-state (new section) Specifies that an editor should change the text of the content control to this Unicode character when the checkbox is marked as checked. 20.440 text:unchecked-state (new section) Specifies that an editor should change the text of the content control to this Unicode character when the checkbox is marked as unchecked. 20.441 text:picture (new section) Specifies that the content control shall only contain a single as-char anchored image, representing a formatted placeholder, to be replaced with an actual picture on interaction. 20.442 text:date (new section) Specifies that the content control shall contain a formatted and localized date. An editor may want to show a date picker to help the user. 20.443 text:date-format (new section) When selecting the day for a date content control, format the selected day using this format string. 20.444 text:date-rfc-language-tag (new section) When formatting a day of a date content control, use this language tag when interpreting the date format string. 20.445 text:current-date (new section) When presenting a date picker for a date content control, default to this date when showing the date picker. 20.446 text:display-text (new section) This attribute is meant to be used with the <text:list-item> element, to provide a human-friendly description of a list item. 20.447 text:value (new section) This attribute is meant to be used with the <text:list-item> element, to provide a machine-readable description of a list item. Schema changes/additions <rng:define name= "paragraph-content" combine= "choice" > <rng:element name= "loext:content-control" > <rng:optional> <!-- default value: false --> <rng:attribute name= "loext:showing-place-holder" > <rng:ref name= "boolean" /> </rng:attribute> </rng:optional> <rng:optional> <!-- default value: false --> <rng:attribute name= "loext:checkbox" > <rng:ref name= "boolean" /> </rng:attribute> </rng:optional> <rng:optional> <!-- default value: false --> <rng:attribute name= "loext:checked" > <rng:ref name= "boolean" /> </rng:attribute> </rng:optional> <rng:optional> <rng:attribute name= "loext:checked-state" > <rng:ref name= "string" /> </rng:attribute> </rng:optional> <rng:optional> <rng:attribute name= "loext:unchecked-state" > <rng:ref name= "string" /> </rng:attribute> </rng:optional> <rng:optional> <!-- default value: false --> <rng:attribute name= "loext:picture" > <rng:ref name= "boolean" /> </rng:attribute> </rng:optional> <rng:optional> <!-- default value: false --> <rng:attribute name= "loext:date" > <rng:ref name= "boolean" /> </rng:attribute> </rng:optional> <rng:optional> <rng:attribute name= "loext:date-format" > <rng:ref name= "string" /> </rng:attribute> </rng:optional> <rng:optional> <rng:attribute name= "loext:date-rfc-language-tag" > <rng:ref name= "language" /> </rng:attribute> </rng:optional> <rng:optional> <rng:attribute name= "loext:current-date" > <rng:ref name= "string" /> </rng:attribute> </rng:optional> <rng:zeroOrMore> <rng:element name= "loext:list-item" > <rng:attribute name= "loext:display-text" > <rng:ref name= "string" /> </rng:attribute> <rng:attribute name= "loext:value" > <rng:ref name= "string" /> </rng:attribute> </rng:element> </rng:zeroOrMore> <rng:zeroOrMore> <rng:ref name= "paragraph-content-or-hyperlink" /> </rng:zeroOrMore> </rng:element> </rng:define> In other words, allow <text:content-control> as a new child element for headings/paragraph, similar to <text:meta> , but with several attributes and child elements, each with their defined meaning.

      Description

      Proposal from Miklos Vajna:

      Use cases

      A content control is one way of adding fill-able pieces to a text document. It has the following properties:

      • inline content controls always start and end inside the same paragraph, unlike bookmarks
      • content controls are well-formed XML elements: this allows nesting, but intentionally doesn't allow bookmark-style random start/end positions in the document
      • content controls have a set of properties, allowing the user to interact with them
      • content controls can contain rich text, similar to <text:meta>

      proposed types (can be extended later)

      Rich text content control: this is similar to <text:text-input>, but it can host formatted text, not just a string.
      Checkbox content control: interacting with this type alters if the checkbox is ticked or not
      Dropdown: this allows choosing one value from a list of choices.
      Picture: this is similar to <text:placeholder text:placeholder-type="image">, but a placeholder image is already part of the document, so a template author can set its properties before providing the actual picture.
      Date: this allows selecting a day from a calendar, provided a wanted language and date format.

      Alternatives considered

      • bookmarks also allow marking a range of formatted text, but they can start and end in different paragraphs and they don't support convenient interaction (e.g. checkbox, date, etc.)
      • fields also support hosting some special content, but can't be nested
      • form controls also support e.g. choosing one item from a list, but they can't be part of the document text to have formatting, breaking to multiple lines, etc. language and date format.

      Impacts

      Conformance: This proposal will not add any mandatory features or behaviors.
      Backwards compatibility: This change will not impact existing ODF processors, the usage of the new element is optional.
      Accessibility impact: This change will not impact accessibility.
      Interoperability:
      OOXML's wordprocessingML has a <w:sdt> markup to describe a similar feature, this proposal allows roundtripping that feature in ODF. LibreOffice 7.4 implements this layout feature in its ODF extension namespace.
      Note that this proposal introduces markup for inline content control, <w:sdt> can also represent block/row/cell content controls as well, while this proposal focuses on inline content controls.

        Attachments

        1. demo.docx
          5 kB
        2. demo.odt
          12 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              regina.henschel Regina Henschel
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: