ODF New Proposal Template

Summary

Proposal owner:

Mingfei Jia

Proposal short name:

data cache,field name, source field id, and cell-auto-resize for data pilot

Rationale

Use cases:

The source data of data pilot tables are from data pilot external, e.g. from another sheet in the current document, from external database, etc. Often when the source data is deleted or is not available, user still hope to view the data pilot tables normally. This requires that the ODF document can save a copy of source data in it. Current ODF specification(OpenDocument-v1.2-draf7-11.odt) does not support this feature.

User often needs to rename the data field name in order for it to be more human readable. But in current ODF specification, the source field name is used to be as data field name, so the data field name can not be changed. In another case, user may create multiple data fields that are binding to the same source field so that each data field represents the specific data view for the source field. For example, one data field represents the normal value of the source field, the second data field represents the field reference value of the source field, and the 2 data fields need a field name to be distinguished from the source field name. Both of the above cases require a field name attribute to be defined in the data pilot field element. This field name needs to be unique at least in the scope of current data pilot table. 

Here we say data field display name seems more appropriate for the meaning. Current proposal uses an existed attribute name "table:field-name" with the same meaning, so that we can avoid to invent extra attribute. But if anyone proposes to use a new name "table:field-display-name" and no one disagrees to that, I will totally agree. Of course, in case of that, the attribute <table:field-name> in the element <table:data-pilot-field-reference> should also be renamed to <table:field-display-name> since they have the same meaning.

Often in the data source, multiple source field names may be duplicated, i.e. at lease 2 columns have the same heading. In this case, each data field needs to have an ID to identify the location of the source field in the data source. For example, this ID could be the index of the source field in the data source table.

Usually user need the cell can be resized automatically according to the height and width of the cell contents(e.g. text) when the data pilot table is refreshed, so that the whole data pilot table size can be resized automatically. This is a boolean type variable that allows user to switch whether or not the cell is resized automatically.

Alternatives considered:

TC member may help work out better solution than current proposal

Requested changes to the ODF Standard

Text changes/additions (please state section numbers):

In OpenDocument-v1.2-draft7-11.odt, section 8.7.3 <table:data-pilot-table>

Add the attribute <table:cache-id>, <table:cell-auto-resize> to the sentence "The <table:data-pilot-table> element may have the following attributes: ...........,and table:target-range-address 18.1083.".
The revised sentence will be: "The <table:data-pilot-table> element may have the following attributes: .........,table:target-range-address 18.1083, table:cache-id 18.xxxx,and table:cell-auto-resize 18.zzzz. The table:cache-id attribute is binding to the value of the corresponding table:cache-id attribute in the element table:data-pilot-cache 8.7.20.".
Here the "xxxx","zzzz" will be filled according to the overall sorting of attributes by the specification editor.

Add a section 8.7.19 <table:data-pilot-caches>:
The <table:data-pilot-caches> element contains all the data pilot data caches within a document.
The <table:data-pilot-caches> element may be used with the following elements: <office:chart> 2.4.5, <office:drawing> 2.4.2, <office:presentation> 2.4.3, <office:spreadsheet> 2.4.4 and <office:text> 2.4.1.
The <table:data-pilot-caches> element has no attributes.
The <table:data-pilot-caches> element may have the following child element: <table:data-pilot-cache> 8.7.20.

Add a section 8.7.20 <table:data-pilot-cache>:
The <table:data-pilot-cache> element specifies a data table that is used to cache the source data of the corresponding data pilot table.
The <table:data-pilot-cache> element may be used with the following element: <table:data-pilot-caches> 8.7.19.
The <table:data-pilot-cache> element may have the following attributes: <table:cache-id> 18.xxxx.
The <table:data-pilot-cache> element may have the following child element: <table:table> 8.1.1.

In OpenDocument-v1.2-draft7-11.odt, chapter 18, add one section:
18.xxxx <table:data-cache-id>
The <table:data-cache-id> attribute specifies the ID of a data pilot data cache which is used to cache the source data of the corresponding data pilot table.
The <table:data-cache-id> attribute may be used with the following elements: <table:data-pilot-table> 8.7.3 and <table:data-pilot-cache> 8.7.20.

In the section 8.7.6 <table:data-pilot-field>
Change the sentence "The <table:data-pilot-field> element may have the following attributes: ......,and table:used-hierarchy 18.1097."
To:
"The <table:data-pilot-field> element may have the following attributes: ......, table:used-hierarchy 18.1097, table:field-name 18.991, and table:source-field-id 18.yyyy."
Here "yyyy" will be filled according to the overall sorting of attributes by the specification editor.

In the section 18.991 <table:field-name>
Change the words "The table:field-name attribute specifies a category column whose members influence the displayed values of the data field of which the <table:data-pilot-field-reference> element is a part."
To:
"The table:field-name attribute specifies a category column whose members influence the displayed values of the data field of which the <table:data-pilot-field-reference> element is a part. It also may specify the data field name of the corresponding data field in a data pilot table. In this case, the table:field-name should be unique in the scope of the corresponding data pilot table."

Change the words "The table:field-name attribute may be used with the following element: <table:data-pilot-field-reference> 8.7.15."
To:
"The table:field-name attribute may be used with the following element: <table:data-pilot-field-reference> 8.7.15 and <table:data-pilot-field> 8.7.6".

Add a section 18.yyyy <table:source-field-id>
The <table:source-field-id> attribute specifies the location of the source field in the data source of a data pilot table.
The <table:source-field-id> attribute may be used with the following element: <table:data-pilot-field> 8.7.6.

Add a section 18.zzzz <table:cell-auto-resize>
The <table:cell-auto-resize> attribute specifies whether or not the cells of a data pilot table is resized according to the height and width of cell contents when the data pilot table is refreshed. 
The <table:cell-auto-resize> attribute may be used with the following element: <table:data-pilot-table> 8.7.3.

Schema changes/additions:

Add the following schemas:

<define name="table-data-pilot-caches">
        <element name="table:data-pilot-caches">
                <zeroOrMore>
                        <ref name="table-data-pilot-cache"/>
                </zeroOrMore>
        </element>
</define>

<define name="table-data-pilot-cache">
        <element name="table:data-pilot-cache">
                <attribute name="cache-id">
                        <ref name="IDREF">
                </attribute>
                <ref name="table-table">
        </element>
</define>

<define name="table-data-pilot-table-attlist" combine="interleave">
        <optional>
                <attribute name="table:cache-id">
                        <ref name="IDREF"/>
                </attribute>
        </optional>
</define>

<define name="table-data-pilot-table-attlist" combine="interleave">
        <optional>
                <attribute name="table:cell-auto-resize" a:defaultValue="true">
                        <ref name="boolean"/>
                </attribute>
        </optional>
</define>

<define name="table-data-pilot-field-attlist" combine="interleave">
        <optional>
                <attribute name="table:field-name">
                        <ref name="string"/>
                </attribute>
        <optional>
        <optional>
                <attribute name="table:source-field-id">
                        <ref name="positiveInteger"/>
                </attribute>
        <optional>
</define>

Impacts

Conformance:

This proposal adds the data pilot cache feature, which enables users to view the data pilot table normally even when the source data is deleted or not available.
This proposal also enables users to rename the data field name, and also can view the data pilot table even when the source fields have duplicate names.

Backwards compatibility:

The table:field-name, table:source-field-id,and table:cache-id are all optional in order to be backward compatible.

Accessibility impact:

No

Workflow (to be filled in by TC Chairs)

Category: CategoryNewProposal

Date Proposal initially made: 2008/11/23

Dates Proposal discussed on TC calls:

Date vote is requested:

Date vote is held:

Results of vote:

data_cache,_field_name_and_source_field_id_for_data_pilot_tables (last edited 2009-08-12 18:04:23 by localhost)