OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only

Re: [office] Proposal for table templates

  • 1.  Re: [office] Proposal for table templates

    Posted 10-06-2003 13:31
     MHonArc v2.5.0b2 -->
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    office message

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


    Subject: Re: [office] Proposal for table templates


    On Monday 06 October 2003 14:41, Michael Brauer wrote:
    > Anyway, maybe "row" and "column" (or even 
    > "first-row" and "first-column" would be more intuitive as names for the 
    > attributes "table:topleftcorner" etc., because the attribute then reads 
    > as something like "take the style for the top left corner from the row". 
    Indeed.
    (hmm, first-row would mean that it would be last-row for bottom corners,
    so this sounds like more opportunities for getting it wrong if writing it
    by hand - or when writing converters). I think just 'row' / 'column' is simpler.
    
    > I'm also wondering whether we should rename the <table:first-row> to 
    > <table:top-row> etc. to use the same terms within the template.
    You mean using the same element name, but different attributes?
    
    > In addition to this, we might consider to also allow different styles 
    > for even and odd numbered rows or columns, since this is something that 
    > is used very often as well.
    Good idea.
    
    So the updated example would be:
     <table:table-template table:topleftcorner="row" table:toprightcorner="row" table:bottomleftcorner="column">
        <table:first-row table:style-name="graystyle"/>
        <table:first-column table:style-name="lightgray"/>
        <table:even-columns table:style-name="lightgray"/>
        <table:default    table:style-name="default"/>
     </table:table-template>
    
    Suggestion: We don't really need both even-columns and odd-columns; if we define 
    one then the other is 'default'.
    This would also support <table:even-rows> of course.
    I guess it would also make sense to say that table:default must always be specified.
    In DTD terms (sorry, I don't know Relax-NG), this could look like
     (first-row?, first-column?, last-row?, last-column?, even-columns?, even-rows?, default)
    
    > OOo takes the precedence rules of XSL-FO/CSS2. That is, a cell 
    > background overwrites a row background, that overwrites a column 
    > background, that overwrites a table background. 
    OK - the file format specification should definitely make that clear.
    
    > Maybe we should define  
    > defaults values for "table:tableleftcorner" etc. that match these 
    > precedence rules.
    Let's see. As I understand it, the precedence rules mean
    that if both a column and a row style are defined, the corner is defined
    by its row.
    So the default value would be "row" if both first-column and first-row are defined.
    But if first-col is defined and not first-row, then the default value would be "column".
    This makes sense - it's a rather rare case to say that first-column is red,
    but topleftcorner should use the default style of the rest of the table.
    (It makes it slightly more difficult to explain what the default value is, though).
    
    > Since many office applications support such table templates, it seems to 
    > be reasonable to me to add them to the specification. The only reason 
    > that they are not part of the OpenOffice.org XML specification is that 
    > OpenOffice.org does not store the templates within the documents.
    > 
    > A reasonable place for the table templates seems to be the 
    > <office:master-styles> element. <office:styles> seems not be be a 
    > reasonable place, because it is not possible to reference automatic 
    > styles inside this element. This in fact might be useful, because 
    > otherwise all cell styles that are referenced from the table have to be 
    > real UI styles.
    This is actually what we do currently, and I think it's fine.
    But I see how not everyone might want to map table templates to real styles,
    and use automatic styles instead.
    
    Thanks for the input.
    
    -- 
    David FAURE, faure@kde.org, sponsored by Trolltech to work on KDE,
    Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
    


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