OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [office] Default values

Hi Thomas,

I agree with your final assertion that an application should not need to 
write out default values.

Saying that the attribute value is implied is however a bit misleading, 
as the semantic of an implied attribute is defined by the XML spec. As 
such, any time you omit the element, the parser would be required to 
imply the presence of the attribute with the default value. This works 
against the inheritance semantics which are defined for styles in ODF.

But I guess this is just terminology. I think we agree, that the 
application should list defaults for style properties. Then, when a 
certain property is resolved along the ancestors of some applied style 
and isn't found, the default is assumed. It's just that this can't be 
expressed directly with XML/RelaxNG constructs and needs to be defined 
by us.


Thomas Zander wrote:
> On Monday 24 September 2007 17:29:13 Patrick Durusau wrote:
>> One quick comment on the "default" values in the RELAX-NG schema.
>> While Michael is correct about the status of those "default" values from
>> a RELAX-NG perspective, to what degree are those values normative for an
>> implementation of ODF?
> Default values should be defined on XML level. This means that if I have an 
> attribute that it has a default value, but an element should not have a 
> default value.
> Or, more specifically;
> <foo bar="1">
>   <baz/>
> </foo>
> 1) you can define that 'bar' if omitted has the default value of "1". Meaning 
> that the above is exactly the same as:
>   <foo><baz/></foo>
> 2) you can not define an element to be implied present. So you can not shorten 
> the xml fragment in some way to omit the <baz/> element. If its not there, 
> that means the functionality is not present.
>> In other words, if the default value of table:print is "true," is a
>> conforming ODF application required to print all tables?
> More specifically;  when you save a document you can omit the attribute 
> table:print when its value is true.
> So a user that marked a table as non-printing would always have to result in 
> an attribute in the XML like table:print="false".
> Or, in other words, is allows for shorter XMLs by allowing the apps to not 
> write attributes which have the default value and at the same time it allows 
> for backwards compatibility when a tag is not present in a previous version 
> of ODF.
> Hope that clears up the usage of default values. :)

Sun Microsystems                Lars Oppermann <lars.oppermann@sun.com>
Nagelsweg 55                    Software Engineer
20097 Hamburg, Germany          Phone: +49 40 23646 959
http://www.sun.com/             Fax:   +49 40 23646 550
Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1,
D-85551 Kirchheim-Heimstetten, Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]