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


David,

I have a strong preference for solution A, because it is compatible with what 
we have today, and it does not require any table-template specific extensions 
to the style concept. For solution B, we actually would have to add a 
paragraph-style attribute to styles that we use for table templates only. For 
solution C (the last one in your mail) we would add a full style family, and 
again the style-name attributes that are only valid within table template 
styles. And we would get incompatible.

In general, I think table templates should be as similar to real tables as 
possible. Even from this perspective, solution A seems to be best. BTW: It 
seems to be a spelling error in the schema that the attribute is called 
"text:style-name" rather than "table:style-name". It is called 
"table:style-name" in the descriptive text already.

I agree that "table:cell-style-name" would have been a better name for the 
attribute, but because OpenDocument is already a standard, I think we should 
stay compatible, and should not change the name unless there are very strong 
arguments for a change. For exactly the same reason I don't think we should 
choose solution C.

Michael


David Faure wrote On 02/13/06 19:00,:
> 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.
> 

-- 
Michael Brauer                                Phone:  +49 40 23646 500
Technical Architect Software Engineering      Fax:    +49 40 23646 550
StarOffice Development
Sun Microsystems GmbH
Sachsenfeld 4
D-20097 Hamburg, Germany                e-mail: michael.brauer@sun.com


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