OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office] Proposal for table templates


Hi David,

why not write

<table:table-template>

    <table:first-row text:style-name="blueish"/>
...

</table:table-template>

with

<style:style style:name="blueish" style:display-name="Blueish cell" 
style:family="table-cell">
<style:table-cell-properties [....] />
<style:paragraph-properies [...] />
</style:style>


as done in the analogous case of

<style:style style:name="mypar" style:family="paragraph">
<style:text-properies [...] />
<style:paragraph-properies [...] />
</style:style>


Best regards,

Florian



>We discussed today the need to include paragraph styles in table templates,
>so that it's clear which paragraph styles will be used in every cell when
>creating a table using a table template.
>
>Currently it looks like
>  <table:table-template>
>     <table:first-row text:style-name="blueish"/>
>     <table:first-column text:style-name="lightgray"/>
>     <table:body      text:style-name="default"/>
>  </table:table-template>
>where the styles referenced by name are expected to be table-cell styles.
>
>Solution A
>
>  Referencing both the cell style and the paragraph style from the table
>template.
>
>  <table:table-template>
>     <table:first-row text:style-name="blueish" text:paragraph-style-name="Heading_1"/>
>     <table:first-column text:style-name="lightgray" text:paragraph-style-name="Normal"/>
>     <table:body      text:style-name="default" text:paragraph-style-name="Body text"/>
>  </table:table-template>
>
>  This reads a bit strange since "style-name" should rather be "cell-style-name",
>  and it doesn't integrate the paragraph style into the cell style like the next solution does:
>
>Solution B
>
>  Referencing the paragraph style from the cell style
>
>  If the user himself can define named styles for table-cells, then it is
>  expected that those styles include the name of a paragraph style.
>  (See "Table / Table Style Manager" in KWord)
>
>  So the cell style "blueish" from the table template would refer to a cell
>  style defined as 
>
>    <style:style style:name="blueish" style:display-name="Blueish cell" style:family="table-cell">
>      <style:table-cell-properties [....] text:paragraph-style-name="Heading_1"/>
>    </style:style>
>
>
>
>To go even further, the current cell styles in KOffice look like:
>
>    <style:style style:name="blueish" style:display-name="Blueish cell" style:family="table-cell">
>      <style:table-cell-properties koffice:frame-style-name="fr6" koffice:paragraph-style-name="U3"/>
>    </style:style>
>
>where the frame style "fr6" is a style with family="graphic", which defines
>background color and border, instead of defining those properties into the
>table-cell-properties directly. For automatic styles this makes no
>difference, it's just as easy to generate an automatic style that refers
>to another one. But for named styles created by the user, this allows to
>have cell styles which refer to an existing frame style as well as an
>existing paragraph style. The format shouldn't mandate how users should
>work with named styles in an application though, so one could say that the format
>should allow both ways of defining table-cell styles: either by defining
>all the properties into the table cell style (which can certainly be useful for
>actual table cells), or defining the properties in graphic and paragraph
>styles refered by the table cell style, by name. But in fact, an application
>which simply stores the border and background properties into the table-cell
>style, could do that with the first model, by simply generating an automatic 
>frame-style and reference it from the table-cell style... so we don't really
>need both ways, except to preserve compatibility with OpenDocument-1.0,
>which seems useless for table templates since they haven't been used yet
>in either OOo or KWord.
>
>So actually... forget solutions A and B: 
>my proposal is to make table templates point to a new kind of style, let's say
>table-cell-template, which would point to a graphic style and a paragraph style by name.
>
>  <table:table-template>
>     <table:first-row text:style-name="blueish"/>
>     <table:first-column text:style-name="lightgray"/>
>     <table:body      text:style-name="default"/>
>  </table:table-template>
>
>just like currently, but
>
>    <style:style style:name="blueish" style:display-name="Blueish cell" style:family="table-cell-template">  <!-- note the family -->
>      <style:table-cell-properties text:graphic-style-name="blue_with_border" text:paragraph-style-name="Heading_1"/>
>    </style:style>
>
>where blue_with_border could either be a real (named) graphic style, or an automatic one. 
>That style would be used to define background and borders in particular.
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]