Menu

#160 rst2odt: OpenDocument validation errors in styles.xml

open
ODT Writer (19)
5
2011-02-19
2011-02-19
Anonymous
No

I have so far been unable to open rst2odt output with the OpenXML translator for Microsoft Word.

One possible reason suggested by the OpenXML translator folks was the fact that output files from rst2odt are reported as "invalid" by the ODF Validator at http://opendocumentfellowship.com/validator - for example, the attached minimal file (created with docutils-0.7 from the single line "This is a test.") returns this result:

Output of validation test file 'test.odt'
This file is not Valid OpenDocument 1.0!

1. error

in styles.xml
/www/TOM/_temp/E7HSIpBHboA6Lg2I5yG5qO8dXOuUQy2g/styles.xml:0: Relax-NG validity error : Expecting element map, got paragraph-properties
/www/TOM/_temp/E7HSIpBHboA6Lg2I5yG5qO8dXOuUQy2g/styles.xml:0: Relax-NG validity error : Expecting an element map, got nothing
/www/TOM/_temp/E7HSIpBHboA6Lg2I5yG5qO8dXOuUQy2g/styles.xml:0: Relax-NG validity error : Invalid attribute default-outline-level for element style
Relax-NG validity error : Extra element style in interleave
/www/TOM/_temp/E7HSIpBHboA6Lg2I5yG5qO8dXOuUQy2g/styles.xml:0: Relax-NG validity error : Invalid sequence in interleave
/www/TOM/_temp/E7HSIpBHboA6Lg2I5yG5qO8dXOuUQy2g/styles.xml:0: Relax-NG validity error : Element styles failed to validate content
/www/TOM/_temp/E7HSIpBHboA6Lg2I5yG5qO8dXOuUQy2g/styles.xml:0: Relax-NG validity error : Invalid attribute transformation for element document-styles

It appears that some style definitions (I have not yet found out which) do not validate against the OpenDocument schema. Interestingly, this problem does not go away even after opening and saving the document in OpenOffice 3.2.

Discussion

  • Anonymous

    Anonymous - 2011-02-19

    Output of converting single-line file "This is a test." with rst2odt

     

    Last edit: Anonymous 2016-12-24
  • Dave Kuhlman

    Dave Kuhlman - 2011-02-23

    I've made a couple of fixes to try to remove a couple of those validation errors, and I've checked in the changes to the SVN repository. However, there are still more errors.

    I'll keep working on the validation errors. Maybe I can solve them one at a time.

    By the way, the following two validation services give different results. In some cases they even tell me that documents created with OpenOffice oowriter have errors.

    - http://opendocumentfellowship.com/validator
    - http://tools.services.openoffice.org/odfvalidator/

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.