[ODFPlugtest] writing implementation specific defaults

robert_weir at us.ibm.com robert_weir at us.ibm.com
Thu Jun 18 22:14:17 CEST 2009


plugtest-bounces at opendocsociety.org wrote on 06/18/2009 08:31:13 PM:

> 
> If a value has no default, or the value differs from the default,
> persist it. 
> 

It is more complicated than your simple example. First, there is a subtle, 
but important difference between storing the value of the default versus 
storing the value of an overridden default.  If we conflate these two 
things then we have lost information, information that is important for 
tasks such as round-tripping or updating templates.

For example, I create a spreadsheet with some numbers in it.  The numbers 
are in en_us locale so numbers look like "1,234.00"  I send it to your 
Auntie in Leiden.  She doesn't want to see "1,234.00".  She wants to see 
"1 230,00" or something like that.  Hard-coding it would prevent the 
document from adapting to locales.

But wait, you might say, just let the application adapt automatically. You 
can just store the format as "1,234.00" and rely on the Dutch version of 
OpenOffice to automatically override the numeric formats in use.  But this 
is a dull blade and it does not cut well.  In particular, it cannot 
distinguish which cells can safely have their formats adjusted, versus 
which ones the original author intentionally set and should not be 
changed.

An editor should have a good idea of what attributes were set explicitly 
versus which ones were set implicitly by a template or other defaulting 
mechanisms.  It is important that we don't flatten out this information 
when saving the file. 

However, if an application does not care about the above subtlety, they 
can make explicit every default being used in the application when they 
persist the document.  They have the ability to do that today, if they 
wanted, with no change needed to the standard.  It could even be a user 
option.

-Rob



More information about the Plugtest mailing list