|
In order to demonstrate (and prove) the concept of an OpenDocument Acid Test (modeled after the Web Standards Projects' largely successful Acid Tests) I have put together a spreadsheet which renders a 14x14 happy face depending on the outcome of some 148 tests. I have used the the IF() function to set the cell contents to " " or "X" for pass and fail respectively and then conditional styles to set the cell background colour to yellow or black (for pass) or red (for fail). As such it is possible even for amateur users to tell at a glance whether their ODF editor is standards compliant for the most commonly requested feature. It is not intended to be a comprehensive test suite, rather to encourage vendors to deliver the most important features.
The conditional styles themselves are quite simple: <style:map style:condition="cell-content()=" "" style:apply-style-name="Yellow" /> As are the table cells:<style:map style:condition="cell-content()="X"" style:apply-style-name="Red" /> <table:table-cell table:style-name="ce3" table:formula="of:=IF(1+1=2;" ";"X")" office:value-type="string" office:string-value=" "><text:p><text:s/></text:p></table:table-cell> This is what the document looks like when opened in OpenOffice 3.0: Unfortuantely not implementing conditional styles disproportionately punishes the impementation, however an astute reader would notice that the cells should appear empty, possibly with the eye images (if images are supported). Google Docs for some reason replaces the formulas with '=f:=IF(1+1=2," ","X")' which results in #ERROR!. The rendering below is because while Google Docs reads and writes ODF files, it doesn't (yet) support images in cells, imported (cross version?) formulas and conditional styles. The sample documents are attached, though a new minimal 'clean' document should be created as a reference as there is currently no true reference implementation for ODF. Sam Johnston Australian Online Solutions |