Bug 101710 - GSoC table template: The saved file is invalid ODF 1.2 extended
Summary: GSoC table template: The saved file is invalid ODF 1.2 extended
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Maxim Monastirsky
URL:
Whiteboard: odf odf_validation target:7.0.0 targe...
Keywords:
Depends on:
Blocks: Table-Styles Writer-Tables-Style ODF-export-invalid
  Show dependency treegraph
 
Reported: 2016-08-24 20:39 UTC by Regina Henschel
Modified: 2022-01-07 14:09 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document with table template (13.26 KB, application/vnd.oasis.opendocument.text)
2016-08-24 20:39 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2016-08-24 20:39:11 UTC
Created attachment 127009 [details]
Test document with table template

The attached document was created and saved with Version: 5.3.0.0.alpha0+
Build ID: d5fab973d0af95c433c5f6a9492014f7db642489
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-08-24_00:07:50
Locale: de-DE (de_DE); Calc: group

Run the validator http://odf-validator2.rhcloud.com/odf-validator2/ and select the ODF Version "ODF extended conforming". In that mode all parts in a foreign name space are ignored. Choose the attached file. You get errors concerning the attribute "style:data-style-name".

Now open the package and look into the styles.xml. You will find the mentioned attribute in the styles "myTableTemplate.#" in the child element style:table-cell-properties which were created for the table template "myTableTemplate". And indeed, the attribute is wrong there. Look at the specification of "style:table-cell-properties" in section 17.18 in http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1416518_253892949. The attribute style:data-style-name is not listed in the allowed attributes.
Comment 1 Regina Henschel 2016-08-24 21:11:01 UTC
Locking the other way round, where style:data-style-name is used, you find section 19.469 with a list of places. The part 19.469.3<style:style> seems to apply here. If I move the attribute one level up in the node tree, the validator does no longer complain about a wrong place. But it is still not correct. The value of the attribute is bad. It is "10101" but such style does not exist. It has to be "N10101" which is the number:currency-style element in the file content.xml.
Comment 2 Yousuf Philips (jay) (retired) 2016-09-03 14:54:40 UTC
Confirmed with a resaved version of attachment 127009 [details].

Version: 5.3.0.0.alpha0+
Build ID: f7513f0f53f2d074c08610a68fb787bb379c31d4
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-09-02_23:58:05
Locale: en-US (en_US.UTF-8); Calc: group
Comment 3 QA Administrators 2018-05-29 02:37:22 UTC Comment hidden (obsolete)
Comment 4 Regina Henschel 2018-11-06 14:19:39 UTC
The generated tables are still invalid. Tested in Version: 6.2.0.0.alpha1+ (x64)
Build ID: f825e6d4082c0d0beb1c95b881f6a2ee9bfc9161
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-05_00:20:26
Locale: de-DE (en_US); Calc: CL
Comment 5 QA Administrators 2019-11-07 03:33:42 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2019-11-07 11:57:08 UTC
The export is still invalid.
Tested with Version: 6.4.0.0.alpha1+ (x64)
Build ID: 7c6226bee72805db7f0e567ca9f06c786a7d0da2
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 7 Maxim Monastirsky 2020-02-27 00:02:05 UTC
My attempt at fixing this:

https://gerrit.libreoffice.org/c/core/+/89551

Review is much appreciated.
Comment 8 Commit Notification 2020-02-27 18:05:56 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/59ace23c367f83491a37e844d16f7d716eff6346

tdf#101710 Fix invalid style:data-style-name attribute

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2020-03-03 17:23:29 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/c98cd883be11ff931ae903469f56cfd5b5f4fd66

tdf#101710 Fix invalid style:data-style-name attribute

It will be available in 6.4.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2020-03-04 12:09:22 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/8cf4c3157348edb9e4e0c453436b26f7200ecb6c

tdf#101710 Fix invalid style:data-style-name attribute

It will be available in 6.3.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Maxim Monastirsky 2020-07-08 09:19:00 UTC
I think we can close this one. Remaining issues (if there are any) can be handled in new bug reports.