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.
Cheers,
Lars
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;
>
>
>
> 1) you can define that 'bar' if omitted has the default value of "1". Meaning
> that the above is exactly the same as:
>
> 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