OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only
  • 1.  Default values of attributes and child elements of

    Posted 09-16-2017 18:20
    Hi members, Chapter 20 contains attributes and elements of <style:*-properties> elements. These are child elements of the <style:style> element. As such they are subject of the inheritance described in section 16.2. If an attribute does not exist in the <style:style> element, which is referenced from the element, which is to be formatted, the value is used, which you get by the inheritance algorithm. The last level in the inheritance chain is described as “If there is no value specified in that default style, an implementation-dependent value is used.“ But some of the items in chapter 20 have wordings like “The default value is 90deg.” (20.2 chart:angle-offset) or “The default value is true if svg:width and svg:height attributes are not specified.” (20.4 chart:auto-size) or “By default, the step count is automatically calculated based on the size and resolution of the filled area.” (20.130 draw:gradient-step-count) What does “default” mean in context of inheritance? It might mean, that the “default” is used, if the <style:style> element, which is referenced by the element, has no formatting information for this formatting aspect. But that would contradict the desired inheritance. Or it might mean, that on the last level of inheritance the “default” value is used. But that would contradict “an implementation-dependent value is used”. To solve this problem I suggest: 1. If it is appropriate for the single formatting aspect: Add a special value for the default value or default behavior of the formatting aspect, so that you can get the “default” even if the parent has a different value set. This is already done for some items by using “auto”, “none” or “-1”. For example in case of draw:gradient-step-count (20.130) solve it to: “A value of 0 means that the step count is automatically calculated based on the size and resolution of the filled area.” 2. Describe the last level of the inheritance algorithm in section 16.2 more precisely and add inheritance to section 20.1: “If there is no value specified in that default style, but this specification defines a default value, than this default value is used. In all remaining cases an implementation-dependent value is used.“ (for 16.2) “For the formatting specified in this chapter the inheritance algorithm described in section 16.2. is in use.” (for 20.1) What do you think? I would write the needed issues then. Kind regards Regina


  • 2.  Re: [office] Default values of attributes and child elements of

    Posted 09-18-2017 14:02
    On 16.09.2017 20:20, Regina Henschel wrote: > Hi members, > > Chapter 20 contains attributes and elements of <style:*-properties> > elements. These are child elements of the <style:style> element. As such > they are subject of the inheritance described in section 16.2. If an > attribute does not exist in the <style:style> element, which is > referenced from the element, which is to be formatted, the value is > used, which you get by the inheritance algorithm. The last level in the > inheritance chain is described as “If there is no value specified in > that default style, an implementation-dependent value is used.“ > > But some of the items in chapter 20 have wordings like “The default > value is 90deg.” (20.2 chart:angle-offset) or “The default value is true > if svg:width and svg:height attributes are not specified.” (20.4 > chart:auto-size) or “By default, the step count is automatically > calculated based on the size and resolution of the filled area.” (20.130 > draw:gradient-step-count) > > What does “default” mean in context of inheritance? > > It might mean, that the “default” is used, if the <style:style> element, > which is referenced by the element, has no formatting information for > this formatting aspect. But that would contradict the desired inheritance. i agree, this interpretation doesn't make sense. > Or it might mean, that on the last level of inheritance the “default” > value is used. But that would contradict “an implementation-dependent > value is used”. > > To solve this problem I suggest: > > 1. If it is appropriate for the single formatting aspect: > Add a special value for the default value or default behavior of the > formatting aspect, so that you can get the “default” even if the parent > has a different value set. This is already done for some items by using > “auto”, “none” or “-1”. > For example in case of draw:gradient-step-count (20.130) solve it to: > “A value of 0 means that the step count is automatically calculated > based on the size and resolution of the filled area.” for this particular attribute i agree; this is even already possible in the ODF 1.2 and 1.1 schema where the type is "nonNegativeInteger", thus allowing 0, and not "positiveInteger", which would be consistent with the prose that forbids values < 3, so i think it was just forgotten to specify what the "0" value means here. > 2. Describe the last level of the inheritance algorithm in section 16.2 > more precisely and add inheritance to section 20.1: > “If there is no value specified in that default style, but this > specification defines a default value, than this default value is used. > In all remaining cases an implementation-dependent value is used.“ (for > 16.2) agreed - we definitely need this. > “For the formatting specified in this chapter the inheritance algorithm > described in section 16.2. is in use.” (for 20.1) i'm not sure if it's necessary to add this, but i wouldn't object to it either... > What do you think? I would write the needed issues then. good points, please go ahead :) -- Michael Stahl Software Engineer Platform Engineering - Desktop Team Red Hat Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com Red Hat GmbH, http://www.de.redhat.com/ , Sitz: Grasbrunn, Handelsregister: Amtsgericht München, HRB 153243, Geschäftsführer: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander