Style override

From Apache OpenOffice Wiki
Revision as of 09:21, 30 November 2006 by Flr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Enhancement of <text:numbered-paragraph> and <text:list> with text:style-override attribute

Problem:

Currently <text:numbered-paragraph> and <text:list> plus <text:list-item> have the following attributes:

  • text:continue-numbering
  • text:level
  • text:start-value
  • text:style-name

We propose to add the attribute “text:style-override” to <text:numbered-paragraph> and <text:list>, which allows to override list styles.

Currently it is not possible to construct lists of the following form:

1. Text
1.1 A
1.2 B
1.c C
1.d D

where the whole lists uses the same counter domain, but different style. E.g. when you insert an item “I” after „B“, then yo get

1. Text
1.1 A
1.2 B
1.3 I
1.d C
1.e D

where „1.c“ and „1.d“ are automatically updated to „1.d“ and „1.e“, because of the same counter domain.

List of the above form would be expressible using the new attribute in the following way:

<text:numbered-paragraph text:style-name=“L1“ text:level=“1“>
<text:p>Text</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:level=“2“>
<text:p>A</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:level=“2“>
<text:p>B</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:style-override=“L2“ text:level=“2“>
<text:p>C</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:style-override=“L2“ text:level=“2“>
<text:p>D</text:p>
</text:numbered-paragraph>

with

<text:list-style style:name="L1">
   <text:list-level-style-number text:level="1" style:num-suffix="." style:num-format="1">
   ...
   </text:list-level-style-number>
   <text:list-level-style-number text:level="2" style:num-suffix="." style:num-format="1">
   ...
   </text:list-level-style-number>
...
  </text:list-style>
and
<text:list-style style:name="L2">
   <text:list-level-style-number text:level="2" style:num-suffix="." style:num-format="a">
   ...
   </text:list-level-style-number>
...
  </text:list-style>

Schema extension:

We propose to extend the schema in the following way:

<define name="text-list-attr" combine="interleave">
<optional>
<attribute name="text:style-override">
<ref name="ID"/>
</attribute>
</optional>
</define>

Description

The “text:style-override” attribute overrides the list style referenced by the “text:style-name” attribute.

Personal tools