OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only
  • 1.  Default values

    Posted 09-24-2007 15:30
    Greetings!
    
    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?
    
    In other words, if the default value of table:print is "true," is a 
    conforming ODF application required to print all tables?
    
    That is to say that the ODF standard requires the treatment of that 
    attribute as though it has a "true" value. That is it is unnecessary for 
    an application to parse the schema as we have declared in the ODF 
    standard the default value for that attribute.
    
    Hope everyone is at the start of a great week!
    
    Patrick
    
    -- 
    Patrick Durusau
    patrick@durusau.net
    Chair, V1 - US TAG to JTC 1/SC 34
    Acting Convener, JTC 1/SC 34/WG 3 (Topic Maps)
    Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
    Co-Editor, OpenDocument Format (OASIS, ISO/IEC 26300)
    
    


  • 2.  Re: [office] Default values

    Posted 09-25-2007 02:42

    I called in late yesterday. I also admitted that it is not the best solution to define default values from the RELAX-NG perspective, but the problem is still valid. Even if the standard does not define it, the ODF applications actually will have default settings in its implementation logic. Default values do not disappear even if we do no define it.

    As to the styles inheritance, I do not think that it will necessarily be a problem. Default value is only valid when there is no value defined, which could include the attributes inherited from parent styles.



    Best Regards,
    Helen Yue(Zhi Yu)


    From: Patrick Durusau <patrick@durusau.net>
    To: office TC <office@lists.oasis-open.org>
    Date: 09/24/2007 11:38 PM
    Subject: [office] Default values





    Greetings!

    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?

    In other words, if the default value of table:print is "true," is a
    conforming ODF application required to print all tables?

    That is to say that the ODF standard requires the treatment of that
    attribute as though it has a "true" value. That is it is unnecessary for
    an application to parse the schema as we have declared in the ODF
    standard the default value for that attribute.

    Hope everyone is at the start of a great week!

    Patrick

    --
    Patrick Durusau
    patrick@durusau.net
    Chair, V1 - US TAG to JTC 1/SC 34
    Acting Convener, JTC 1/SC 34/WG 3 (Topic Maps)
    Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
    Co-Editor, OpenDocument Format (OASIS, ISO/IEC 26300)




  • 3.  Re: [office] Default values

    Posted 09-25-2007 09:49

    I called in late yesterday. I also admitted that it is not the best solution to define default values from the RELAX-NG perspective, but the problem is still valid. Even if the standard does not define it, the ODF applications actually will have default settings in its implementation logic.

    As to the styles inheritance, I'm thinking that it is possibly not necessarily a problem. Default value is only valid when there is no value defined, which could include the attributes inherited from parent styles.

    Best Regards,
    Helen Yue(Zhi Yu)


    From: Patrick Durusau <patrick@durusau.net>
    To: office TC <office@lists.oasis-open.org>
    Date: 09/24/2007 11:38 PM
    Subject: [office] Default values





    Greetings!

    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?

    In other words, if the default value of table:print is "true," is a
    conforming ODF application required to print all tables?

    That is to say that the ODF standard requires the treatment of that
    attribute as though it has a "true" value. That is it is unnecessary for
    an application to parse the schema as we have declared in the ODF
    standard the default value for that attribute.

    Hope everyone is at the start of a great week!

    Patrick

    --
    Patrick Durusau
    patrick@durusau.net
    Chair, V1 - US TAG to JTC 1/SC 34
    Acting Convener, JTC 1/SC 34/WG 3 (Topic Maps)
    Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
    Co-Editor, OpenDocument Format (OASIS, ISO/IEC 26300)




  • 4.  Re: [office] Default values

    Posted 09-25-2007 10:37
    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 


  • 5.  Re: [office] Default values

    Posted 09-25-2007 12:44
    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