-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: ODF 1.2
-
Fix Version/s: ODF 1.3
-
Component/s: Formatting Properties, Part 3 (Schema) [1.2: 1], Styles
-
Labels:None
-
Proposal:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-style_style
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)
What does “default” mean in context of inheritance? It cannot 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, because that would contradict the desired inheritance.
It can mean, that on the last level of inheritance the “default” value is used. But currently that is not specified.
This proposal adds a rule about such "default" values to section 16.2 <style:style>
You are right that the default values from the spec are not taken into account.
You should still take into account that aside of the explicit style hierarchy provided by <style:style> elements referenced by parent, there is the implicit default style set for each style:family provided by <style:default-style>
see http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-style_default-style
All default values within the ODF 1.2 specification are being 'flagged' by a certain character style. With this metadata it is possible to extract all default values from the specification via XSLT.
We might want to add the XSL script to the ODF TC repository as part of a new regression test to be certain that all default values are kept extractable.
For a list of the default values with its values, take a look at the end part of the following config file:
http://svn.apache.org/viewvc/incubator/odf/trunk/generator/schema2template/src/main/resources/examples/odf/config.xml?revision=1167956&view=markup
In this context, a short question: Is there are list of pointers to the list of the implementation-dependent default values? I stumbled today over the fo:page-width and fo:page-height being both optional, so you might set only one for the page layout. What other value is being taken for the rectangle being the page, when only one value width or height of the page is being provided? Is there a local dependent default like US & Canda using letter format while the rest ISO A4?
I would be curious of a coverage of format attributes by defaults from spec or implementation...