Bug 45446 - Writer ODF export: invalid attribute "style:keep-together"
Summary: Writer ODF export: invalid attribute "style:keep-together"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:3.5.1 target:3.6.0beta0 odf od...
Keywords:
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2012-01-31 07:01 UTC by sasha.libreoffice
Modified: 2017-05-28 14:17 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
validated file (50.57 KB, application/vnd.oasis.opendocument.text)
2012-01-31 07:01 UTC, sasha.libreoffice
Details
full eror output (54.35 KB, text/html)
2012-01-31 07:03 UTC, sasha.libreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasha.libreoffice 2012-01-31 07:01:54 UTC
Created attachment 56391 [details]
validated file

I have send to site http://odf-validator.rhcloud.com/
one random file
this is result:
odt/content.xml[2,32719]: Error: unexpected attribute "style:keep-together"
Comment 1 sasha.libreoffice 2012-01-31 07:03:16 UTC
Created attachment 56392 [details]
full eror output
Comment 2 Michael Stahl (allotropia) 2012-02-01 10:17:01 UTC
there is a configuration setting in
officecfg/registry/data/org/openoffice/Office/Common.xcu:

 <node oor:name="Save">
    <node oor:name="Document">
      <prop oor:name="SaveBackwardCompatibleODF" oor:type="xs:boolean">
        <value>true</value>
      </prop>

unfortunately this is enabled by default.
there doesn't seem to be any code in LO that changes the setting,
it is only read by the ODF export filter.

some digging reveals that it is used for the following cases
where invalid ODF elements or attributes are written for
backwards compatibility reasons:

- style:keep-together
  sw/source/filter/xml/xmlexpit.cxx
  bce5e157785745a6729db62b15fb98bc396cddee
- table:dependence
  sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
  c7a3859693971bf7103bfb0d05d64712e724fa37
  (this one actually has an OOo issue i#80033)
- animation:iterate-interval
  xmloff/source/draw/animationexport.cxx
  7477a65e09b20917adf025550c550f8822b508ee
  bdbec2daaaba5ab0a9456811d05c4b51431dc7a8
- xlink:*
  xmloff/source/draw/shapeexport2.cxx
  77baabe992c77018a0467ffec8f9482f8d76b66b
  615b3824b258d09e24d92b0135827e03bfd97da7
  OOo i#42375
- text:page-continuation-string
  xmloff/source/text/txtflde.cxx
  575222083e058a740f5ad69e14e18622c3d4f7af
- office:value-type
  xmloff/source/text/txtflde.cxx
  66b908b45cde78af020b35e817e67bc40b8493f0
  OOo i#81766

apparently all of these went into OOo 2.4 or earlier versions;
in all cases the ODF import code was adapted to read the ODF conformant
equivalent of the invalid elements or attributes.
thus this is only for backward compatibility with OOo 2.3 or earlier.

thus i would say that at least the configuration setting should
be turned off by default in LO master and 3.5.

perhaps we should even remove the specific uses of this setting on master.

but i would want to retain the configuration option as such,
because perhaps some other defect will be identified that
would require such a hack for a transition period.
Comment 3 Michael Stahl (allotropia) 2012-02-02 09:34:56 UTC
fixed by changing the configuration setting on master:
 e2bc0c04ba0c33e02f1842013041f26ccb2de77d
Comment 4 sasha.libreoffice 2012-02-03 00:59:57 UTC
Thanks!