odftoolkit icon indicating copy to clipboard operation
odftoolkit copied to clipboard

Support validating flat odf documents

Open fwilhe2 opened this issue 2 months ago • 4 comments

I'm building rechenbrett, a go library for creating open document spreadsheet files. I care about creating valid documents, so I was looking for a validator. If I understood it right, odf toolkit can only work with 'normal'/zipped ods files, not with flat ods files (fods). I like using fods files because they are friendly for version control.

Would it be possible to allow validating flat ods files with this validator? This would simplify my development workflow as working with zipped ods files is a bit cumbersome when developing/debugging.

fwilhe2 avatar Nov 09 '25 18:11 fwilhe2

yes that's true; so far nobody required flat ODF validation but if there's a patch to implement that i'd review it...

mistmist avatar Nov 10 '25 12:11 mistmist

@fwilhe2, you might also consider unzipping the ODS, normalising the XML (like ODF conform line indent) and checking this into Git: https://github.com/oasis-tcs/odf-tc/tree/master/src/main/resources/odf1.4/OpenDocument-v1.4-part4-formula_odt ) Four years ago, there was a bug in LibreOffice that, with every save, the automatic style names changed, causing a lot of noise.. This batch might work with pre-commit actions of Git or a plain script, but I got a cold and can not wrap my head around atm...

svanteschubert avatar Nov 10 '25 13:11 svanteschubert

PS: Of course, you might use the LibreOffice pretty printing, see https://github.com/oasis-tcs/odf-tc?tab=readme-ov-file#odf-editing-tool (as I have a cold, better stop now)...

svanteschubert avatar Nov 10 '25 13:11 svanteschubert

yes that's true; so far nobody required flat ODF validation but if there's a patch to implement that i'd review it...

Got it, might look into it. Thanks.

fwilhe2 avatar Nov 10 '25 17:11 fwilhe2