Created attachment 132155 [details] Example with wrong attribute LibreOffice writes an attribute 'text:style-name' in an element 'table:table-template'. But it should be an attribute 'table:style-name', see <define name="table-table-template-attlist"> in schema line #12240. To reproduce the problem, take a new Impress document and insert a table. Save it, unpack and look in file styles.xml. Search for element <table:table-template> It is likely line #596 in method XMLTableExport::exportTableTemplates() in /core/xmloff/source/table/XMLTableExport.cxx I think, this line was forgotten when bug 35190 was fixed.
@Thorsten, would you mind commenting on this one as you were the one who fixed bug 35190 ?
(In reply to Xisco Faulí from comment #1) > @Thorsten, would you mind commenting on this one as you were the one who > fixed bug 35190 ? Ah - so yeah, what Regina suggests.
line #609 meanwhile
Correction: The element <table:table-template> is in chapter 16.18. The correct attribute is table:name, which is specified in 19.673.14, in OpenDocument-v1.2-os-schema.rng line #12240.
Hi, I have submitted a patch for this at https://gerrit.libreoffice.org/#/c/48373/ Now the name for attribute in table-template is table:name.
it looks like the code to import this style:name attribute was added in commit 40fba0f4418084d50cc5c388cb0b6e1abe395d61 "GSoC Writer Table Styles Import" for the 5.3 release. guess we can probably get away with changing this for 6.1 but i don't want this fix backported to earlier releases.
actually i have an improved suggestion: we can write both the wrong and the correct attribute, then LO < 5.3 can still read the wrong attribute. except if the user has set a "strict" ODF version, then write only the correct attribute. look around line 634 in XMLTableExport.cxx, there is a variable of type ODFSaneDefaultVersion, and the next line has the needed check of that variable, so very easy to do this.
Okay. So for LO versions < 5.3 the XML should look like- <table:table-template text:style-name="default" text:style-name="default"> But if the strict version is set then the XML would be- <table:table-template text:style-name="default"> Is this correct?
> <table:table-template text:style-name="default" text:style-name="default"> <table:table-template table:name="default" text:style-name="default"> > But if the strict version is set then the XML would be- > > <table:table-template text:style-name="default"> > Is this correct?
(In reply to abstatic from comment #9) > <table:table-template table:name="default" text:style-name="default"> > > > But if the strict version is set then the XML would be- > > > > <table:table-template text:style-name="default"> > > > Is this correct? almost :) 50% correct :) the strict version should be: <table:table-template table:name="default">
Abhishek Shrivastava committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e3e2f6911d6231c706ce8c77e5cd6733335d6342 tdf#106780 Fix for invalid attribute in impress ODF It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Abhishek Shrivastava committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5563f111d5700bb03884cd469288b09281e37dd1&h=libreoffice-6-0 tdf#106780 Fix for invalid attribute in impress ODF It will be available in 6.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Abhishek Shrivastava committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fa3b7206f1b6f11dc3d133d06289aaaad3e422fd&h=libreoffice-5-4 tdf#106780 Fix for invalid attribute in impress ODF It will be available in 5.4.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The wrong attribute text:style-name is still written in "ODF 1.2 extended" in addition to table:name. But that attribute is not needed at all, because table:name is already written. And "text" is an OASIS namespace and not a private namespace and therefore may not be used in this context.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d6ba23a7c0fbd4b59b8011012bbcaa002c5c84ca tdf#106780 xmloff: ODF export: only write invalid text:style-name... 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.
fixed now on master: invalid attribute is only written in ODF 1.2 Extended (compatibility mode) which is intended for such things
Seen OK in Version: 7.0.0.0.alpha1+ (x64) Build ID: 0a7341c26741f16835c9062c309e7d3a7fca8209 CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win Locale: de-DE (en_US); UI: en-US Calc: CL