Custom display names in data pilot tables

Summary

Proposal owner:

Kohei Yoshida

Proposal short name: Custom display names in data pilot tables

Support for custom display names in data pilot tables.

Rationale

Use cases:

Users often wish to change the names of various components of data pilot tables to fit their display needs without altering the source data itself.  The components of a data pilot table that can have a custom display name are: 1) field names, 2) field member names, 3) field subtotal names, and 4) the grand total name.

Alternatives considered:

None.

Requested changes to the ODF Standard

8.7.x table:data-pilot-grand-total (new)

The <table:data-pilot-grand-total> element stores attributes associated with the grand total results of a data pilot table.  Each data pilot table may display column grand total, row grand total, or both.  This element stores visibility of each grand total result and optionally an alternative text to be displayed in lieu of the default text.  When this element is absent, both the column and row grand totals should be present and visible.

The <table:data-pilot-grand-total> element replaces the deprecated table:grand-total attribute, which was previously used as an attribute of the <table:data-pilot-table> element to store visibility information of the grand total results.  For backward compatibility, however, the application should, when writing to a document, store the visibility information with the table:grand-total attribute even when the <table:data-pilot-grand-total> element is provided.  When loading a document, the visibility information stored with the <table:data-pilot-grand-total> elements shall take precedence over the one stored with the table:grand-total attribute of the <table:data-pilot-table> element.

The <table:data-pilot-grand-total> element may be used within the following element: <table:data-pilot-table>.

The <table:data-pilot-grand-total> element may have the following attributes: table:display, table:orientation, table:display-name.

18.x table:display-name (new)

18.x.1 General (new)

The table:display-name attribute in general is used with an element that has a "name" attribute associated with it (primary name), to specify an alternative name for display purposes.  When this attribute is absent, the value of the display name equals the value of the primary name of that element.

The table:display-name may be used with the following elements: <table:data-pilot-grand-total>, <table:data-pilot-field>, <table:data-pilot-member>, and <table:data-pilot-subtotal>.

18.x.2 <table:data-pilot-subtotal> (new)

The table:data-pilot-subtotal element may use the table:display-name attribute to store an alternative subtotal text.  When the value of the table:function attribute is "auto", the alternative text specified by the table:display-name attribute shall be used instead of the default subtotal text.

When the alternative subtotal text is used, a backslash character ('\') must escape a question mark ('?'), while all un-escaped question marks shall be interpreted as the respective field member name when the text is displayed on screen.  A literal backslash character is represented by two successive backslash characters ('\\').

18.972 table:display (change)

The table:display attribute may be used with the following elements: <style:table-properties> 16.8, <table:data-pilot-grand-total> 8.7.x, <table:data-pilot-member> 8.7.11, <table:error-message> 8.4.3.2, <table:help-message> 8.4.3.1, <table:table-column-group> 8.1.9 and <table:table-row-group> 8.1.8.

18.1041.x <table:data-pilot-grand-total> (new)

The table:orientation attribute specifies the orientation of a grand total result.  The possible values are: row, column, or both.  The default value is both.

Schema changes/additions:

<define name="table-display-name" combine="interleave">
    <optional>
        <attribute name="table:display-name">
            <ref name="string"/>
        </attribute>
    </optional>
</define>

<define name="table-data-pilot-grand-total">
    <element name="table:data-pilot-grand-total">
        <group>
            <attribute name="table:orientation">
                <choice>
                    <value>row</value>
                    <value>column</value>
                    <value>both</value>
                </choice>
            </attribute>
            <attribute name="table:display">
                <ref name="boolean"/>
            </attribute>
            <ref name="table-display-name"/>
        </group>
    </element>    
</define>

<define name="table-data-pilot-table">
    <element name="table:data-pilot-table">
        <ref name="table-data-pilot-table-attlist"/>
        <optional>
            <choice>
                <ref name="table-database-source-sql"/>
                <ref name="table-database-source-table"/>
                <ref name="table-database-source-query"/>
                <ref name="table-source-service"/>
                <ref name="table-source-cell-range"/>
            </choice>
        </optional>
        <zeroOrMore>
            <ref name="table-data-pilot-grand-total"/>
        </zeroOrMore>
        <oneOrMore>
            <ref name="table-data-pilot-field"/>
        </oneOrMore>
    </element>
</define>

<define name="table-data-pilot-field-attlist" combine="interleave">
    <ref name="table-display-name"/>
</define>

<define name="table-data-pilot-member-attlist" combine="interleave">
    <ref name="table-display-name"/>
</define>

<define name="table-data-pilot-subtotal-attlist">
    <choice>
        <attribute name="table:function">
            <choice>
                <value>average</value>
                <value>count</value>
                <value>countnums</value>
                <value>max</value>
                <value>min</value>
                <value>product</value>
                <value>stdev</value>
                <value>stdevp</value>
                <value>sum</value>
                <value>var</value>
                <value>varp</value>
                <ref name="string"/>
            </choice>
        </attribute>
        <group>
            <attribute name="table:function"> 
                <value>auto</value>
            </attribute> 
            <ref name="table-display-name"/>
        </group>
    </choice>
</define>

Impacts

Conformance:

This change introduces a new requirement that the table:display-name can only be used in the <table:data-pilot-subtotal> element only when the value of the table:function attribute is auto.

Backwards compatibility:

This change deprecates the table:grand-total attribute from the <table:data-pilot-table> element, in favor of using the new <table:data-pilot-grand-total> element.  For backward compatibility, the application should still provide the table:grand-total attribute with the <table:data-pilot-table> element, and assign appropriate value to it based on the value of the table:display attribute of the <table:data-pilot-grand-total> elements.

Accessibility impact:

None.

Workflow (to be filled in by TC Chairs)

Category: CategoryNewProposal

Date Proposal initially made:

Dates Proposal discussed on TC calls:

Date vote is requested:

Date vote is held:

Results of vote:


CategoryNewProposal

display_names_in_data_pilot (last edited 2009-11-18 19:57:46 by kyoshida)