Improving ODF applications by sharing ODF tests Svante Schubert Software Engineer Sun Microsystems Inc.
2 Why am I here? Would like to discuss ODF Testing based on experience.. > Member of Sun Microsystems StarOffice / OpenOffice.org team since 1999 > Co-Lead OpenOffice.org XML Project > Co-Lead ODF Toolkit Project > Member of the OASIS OpenDocument Format (ODF) TC > Observer of OASIS Open Document Format Interoperability and Conformance (OIC)
Do you know ODF? The OASIS / ISO standard for office documents (2005/06) The document format of many office applications
Do you know ODF? Origin from OpenOffice.org's default format A zipped package of XML and related files (image, sound, user files)
ODF Basics - Package & Files ISO standardized default content (as shown, but NOT Picture folder) Manifest as an Inventory / “table of content” Any user content...
ODF Basics - Three Parts of ODF XML schema for office applications and it semantics. 2. OpenDocument formula language 3. OpenDocument package format
The Vision of ODF Testing Downloadable Test Documents for ODF Applications > Server with Test Docs for every ODF feature > Test Docs covers all ODF features > Hierarchy of Test documents (binary feature Tree) –Root document has all features –Every Document has two child documents (each has half of features) > Distributed Versioning System (e.g. Mercurial) Downloadable Test Framework (e.g. TestNG) > Tools for ODF compare, ODF XML Validator, etc. > Definition & Referenzimplementation of Tests
Puzzles of our Vision What is an ODF Application? Shall all ODF Application act the same? What is an ODF Feature? How to compare two ODF documents?
What is an ODF Application? Defined by Conformance to the ODF specification > Conforming OpenDocument Documents (e.g. require one of those: content.xml, styles.xml, settings.xml, meta.xml) > Conforming OpenDocument Generator (creates at least one conformant OD document) > Conforming OpenDocument Processor > (parse and process OD documents) Based on
Shall all ODF Application act the same? Different Requirements demand different subsets > Hardware: (e.g. mobile phones, printer) > Software: (webbrowser) > Scenario: (long-term archiving: leaving out unsuited features) Requirements lead to ODF Profiles (part of OIC charta) > Different Profiles have different Conformance Tests
What is an ODF feature? > Overall similar understanding, hard to specify > Feature might be a Table in ODF > Sub-/Atomic features can be repeated column If not specified how to list ODF features? > Pragmatic Approaches: –Chapters of ODF 1.1 specification –Map GUI of an ODF App to Feature (menue of OOo) We need one test document per feature > How can create documents automatically?
How to compare two ODF documents? Text compare does not work on XML documents > Logical logically equivalent files vary in representation (e.g. Namespace on any ancestor or prefix can be arbitrary) > One Solution: Canonicalization (c14n) (bring XML file to the one defined version) ODF documents add new logic equivalence > ID of most inner document relation may vary (e.g. Automatic Style name, Form / Control binding) > Nesting of text:span may vary as long as same styles are applied (example follow...) c14n :
How to compare two ODF documents? green red green green red green
How to compare two ODF documents? Graphical Document Comparance using a Trick: 1) Print Document to PostScript (PS) 2)Transform PS to a Graphical Bitmap File 3)Compare Graphic File with Reference Bitmap Sources available under -
Graphical Document Comparance ReferenceCurrent documentDifference ODF App AODF App B
Information & Acknowledgement ODF Toolkit - e.g. ODF Validatorhttp://odftoolkit.org Based on work of the ODF Interoperability and Conformance (OIC) TC open.org/committees/oic/charter.php open.org/committees/oic/charter.php Thanks to David Marston (IBM Research) for sharing his knowledge on designing and defining conformance testing (XSLT, XPath, XQuery)
Thank you – Questions & Answers Svante Schubert