Bug 58795 - FILESAVE: Empty document is INVALID ODF 1.2: Error unexpected attribute "style:contextual-spacing"
Summary: FILESAVE: Empty document is INVALID ODF 1.2: Error unexpected attribute "styl...
Status: RESOLVED DUPLICATE of bug 58112
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: BSA odf_validation
: 61061 (view as bug list)
Depends on:
Blocks: 61061
  Show dependency treegraph
Reported: 2012-12-27 07:42 UTC by Rainer Bielefeld Retired
Modified: 2013-11-14 23:38 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

Validation results for ODF 1.2 Extended (18.76 KB, application/vnd.oasis.opendocument.text)
2012-12-27 07:42 UTC, Rainer Bielefeld Retired

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2012-12-27 07:42:09 UTC
Created attachment 72168 [details]
Validation results for ODF 1.2 Extended

Steps to reproduce with server  installation of  " (Build ID: e90807267808eb062b93d762c50c02113ca40db) TinderBox: Win-x86@6, Branch:master, Time: 2012-12-26_22:00:49   -  ENGLISH UI / German Locale  on German WIN7 Home Premium (64bit) with own separate User Profile:

1. Launch LibO
2. Menu 'Tools -> Options -> Load/Save -> General - 
   ODF Format Version = 1.2 Extended (recommended) <ok>
3. Open New Writer Document from LibO Start center
4. Save document
5. Validate Document using <http://odf-validator2.rhcloud.com/odf-validator2/>

Current behavior: Invalid ODF with 'Error unexpected attribute "style:contextual-spacing"'

With setting ODF Format Version = 1.2 a valid document will be saved.
Of course, Extended does not promise to produceODF 1.2 Strict, but is it really necessary to break the rules for an empty document?

Operating System: Windows 7
Version: Master
Comment 1 Jorendc 2013-01-10 16:40:27 UTC
I can confirm using Ubuntu 12.10 x64 so -> platforms 'All'

I get the same message as Rainer; No error message with '1.2' (not extended).
Comment 2 Rainer Bielefeld Retired 2013-02-18 12:56:33 UTC
Same with
Comment 3 Rainer Bielefeld Retired 2013-02-18 12:59:48 UTC
Please change Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug or forward the Bug if it's not your turf
Comment 4 Urmas 2013-02-18 14:49:05 UTC
From ODF standard:

Conforming applications ... MUST read documents that are valid against the OpenDocument schema if all foreign elements and attributes are removed before validation takes place

The various <style:*-properties> elements ... MAY have arbitrary
attributes attached and MAY have arbitrary element content.

So the problem with a foreign attribute in style:paragraph-properties is validator's problem.
Comment 5 João Mac-Cormick 2013-07-20 20:56:32 UTC error

ODF Validator Result Page
Result for x.odt

The document is NOT conformant ODF1.2!
x.odt: Info: ODF version of root document: 1.2
internal:/schema/odf1.2/OpenDocument-v1.2-cos01-manifest-schema.rng: Info: parsed.
x.odt/META-INF/manifest.xml: Info: no errors, no warnings
x.odt/mimetype: Info: no errors, no warnings
x.odt: Info: Media Type: application/vnd.oasis.opendocument.text
internal:/schema/odf1.2/OpenDocument-v1.2-cos01-schema.rng: Info: parsed.
x.odt/meta.xml: Info: Generator: LibreOffice/$Windows_x86 LibreOffice_project/9e9821abd0ffdbc09cd8c52eaa574fa09eb08f2
x.odt/meta.xml: Info: no errors, no warnings
x.odt/settings.xml: Info: no errors, no warnings
x.odt/styles.xml[2,4624]: Error: unexpected attribute "style:contextual-spacing"
x.odt/styles.xml[2,5108]: Error: unexpected attribute "style:contextual-spacing"
x.odt/styles.xml[2,5642]: Error: unexpected attribute "style:contextual-spacing"
x.odt/styles.xml: Info: 3 errors, no warnings
x.odt/content.xml: Info: no errors, no warnings
internal:/schema/odf1.2/OpenDocument-v1.2-cos01-dsig-schema.rng: Info: parsed.
x.odt: Info: 3 errors, no warnings
Comment 6 João Mac-Cormick 2013-07-20 20:59:35 UTC
*** Bug 61061 has been marked as a duplicate of this bug. ***
Comment 7 João Mac-Cormick 2013-07-20 21:01:59 UTC
Comment 8 João Mac-Cormick 2013-08-14 13:20:36 UTC
To wait for the new version of ODF.

OASIS Open Document Format for Office Applications (OpenDocument) TC
[text] Proposal: contextual spacing of paragraphs
Created: 12/Jul/12 11:44 AM   Updated: 15/Oct/12 07:53 PM
Component/s: 	Styles
Affects Version/s: 	None
Fix Version/s: 	ODF 1.3

Environment: 	This is an enhancement, described in terms of changes to OpenDocument-v1.2 


Comment 9 Robinson Tryon (qubit) 2013-11-14 23:38:37 UTC
Per devs, this is NOTABUG:
"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."

(I would still like our docs to pass the validator...)

*** This bug has been marked as a duplicate of bug 58112 ***