0

I'm building a library to create ODS files in TypeScript. For simplicity reasons I'm currently using the "Flat" format (fods file extension, single xml file, not zipped).

I'm not an expert in XML but I think it should be possible to validate the file with a schema to ensure I'm creating valid files. How can I do that?

I could not find a good resource via google or on SO so far, so any help is appreciated.

What I'm currently doing is to use libreoffice with the headless option to convert the file to csv and compare that with my expected output, but that seems not ideal.

Florian Wilhelm
  • 600
  • 4
  • 17

1 Answers1

0

The specification of the Open Document format is here: http://docs.oasis-open.org/office/v1.2/cs01/OpenDocument-v1.2-cs01-part1.html

So I guess you could create a script which validates the XML against this specification, but seriously, the easiest way is to test in LibreOffice/Excel and see if it works.

amchacon
  • 1,891
  • 1
  • 18
  • 29