Bug 58112 - "style:contextual-spacing" is not valid ODF 1.2
Summary: "style:contextual-spacing" is not valid ODF 1.2
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.4.3 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: BSA odf odf_validation target:4.3.0 t...
Keywords:
: 58795 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-11 05:34 UTC by Rainer Bielefeld Retired
Modified: 2013-12-21 19:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test Kit with all mentioned documents (57.73 KB, application/zip)
2012-12-11 05:34 UTC, Rainer Bielefeld Retired
Details
Validation Results with LibO 333 (19.57 KB, application/vnd.oasis.opendocument.text)
2012-12-11 05:50 UTC, Rainer Bielefeld Retired
Details
Falidation Results with LibO 3.6.4.3 (16.66 KB, application/vnd.oasis.opendocument.text)
2012-12-11 06:29 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2012-12-11 05:34:01 UTC
Created attachment 71306 [details]
Test Kit with all mentioned documents

After research for "Bug 54627 FILESAVE FILEOPEN: Style inheritance broken after saving OOo 3.2.1 doc" and "Bug 57960 - Inconsistent Line Spacing Behavior Between 3.6 and 4.0 Branches" I created a Document "validdocument.odt" similar to  Attachment 66768 [details] for Bug 54627 from the scratch with AOOo 3.4.1. This document passed ODF validation by "Officeotron" and "Cyclone" as valid.

Then I opened that document with LibO 4.0, saved it as "validdocumentsavedfromLibO40.odt" and did a validation again. Both validators rate it invalid, for details please see attached "Validation_Results.odt"!

Details concerning ODF validators:
 <http://wiki.documentfoundation.org/QA-Projects-Incubator#Other_necessary_activities>
              
Operating System: Windows 7
Comment 1 Rainer Bielefeld Retired 2012-12-11 05:38:16 UTC
I have no skills to check the document source. 

@Joel, eymux:
can we do anything else before we forward to developers?
Comment 2 Rainer Bielefeld Retired 2012-12-11 05:50:36 UTC
Created attachment 71307 [details]
Validation Results with LibO 333
Comment 3 Rainer Bielefeld Retired 2012-12-11 06:19:02 UTC
Document saved from server installation of "LibreOffice 3.5.7.2 rc German UI/Locale [Build-ID: 3215f89-f603614-ab984f2-7348103-1225a5b] on German WIN7 Home Premium (64bit) have been rated VALID, so this one is a regression
Comment 4 Rainer Bielefeld Retired 2012-12-11 06:29:04 UTC
Created attachment 71309 [details]
Falidation Results with LibO 3.6.4.3

For me the 3.6.4.3 results look very similar to the ones from 4.0, so I think the current invalidity has been introduced with 3.6.

Bibisecting of this would be really hard, so first we should be sure that the Validators recognized a real problem.
Comment 5 Michael Stahl (allotropia) 2012-12-11 20:28:17 UTC
i get the same error here with ODFToolkit validator as the
office-o-tron one in the attachment:

Documents/issues/fdo#58112/out_master_12ext.odt/styles.xml[2,5103]:  Error: unexpected attribute "style:contextual-spacing"

this only happens when using ODF 1.2 extended (default) format;
not when saving as 1.1 or 1.2.

the attribute "style:contextual-spacing" is indeed not in ODF 1.2
but since LO doesn't write it when set to ODF 1.2 it's not really a problem.
Comment 6 Rainer Bielefeld Retired 2012-12-12 05:41:15 UTC
@Michael Stahl 
Thank you for the detailed analysis. I can confirm, Save as ODF 1.2 produces a valid document.  

I simply used the "1.2 Extended (recommended)" mode, and due to help this should only allow comments in Draw and Impress, I wonder why this also causes a syntax error in Writer.
Comment 7 Miklos Vajna 2012-12-13 15:09:25 UTC
See http://wiki.documentfoundation.org/Development/ODF_Implementer_Notes#LibreOffice_ODF_extensions

Contextual spacing is proposed to be part of the next ODF version, till then we just write it in extended ODF mode, so should be OK.
Comment 8 Robinson Tryon (qubit) 2013-11-14 23:38:37 UTC
*** Bug 58795 has been marked as a duplicate of this bug. ***
Comment 9 Commit Notification 2013-12-20 20:44:15 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ef5e7b69440baa9f222d1ec870668d31d08268f0

prepare to accept loext:contextual-spacing, fdo#58112



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.
Comment 10 Commit Notification 2013-12-20 20:48:40 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=116e214a82dcdce9d4764646ff43b60d5c7c9392&h=libreoffice-4-2

prepare to accept loext:contextual-spacing, fdo#58112


It will be available in LibreOffice 4.2.

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.
Comment 11 Eike Rathke 2013-12-20 21:04:29 UTC
Pending review for 4-1 at https://gerrit.libreoffice.org/7151
Comment 12 Commit Notification 2013-12-20 21:15:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d1ae39e484f888ddcca15f584cddd2b3ccae1024

fdo#58112 write loext:contextual-spacing accept style:contextual-spacing



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.
Comment 13 Commit Notification 2013-12-21 19:37:50 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c90074b8dcfbb10ab03acfa082ac746ea38df6e&h=libreoffice-4-1

prepare to accept loext:contextual-spacing, fdo#58112


It will be available in LibreOffice 4.1.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.