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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] CALS table attribute inheritance questions


----- Original Message ----- 
From: "Max Starkenburg" <maxwell@owlnet.rice.edu>
To: "Bob Stayton" <bobs@sagehill.net>
Cc: <docbook@lists.oasis-open.org>
Sent: Thursday, December 15, 2005 11:51 AM
Subject: Re: [docbook] CALS table attribute inheritance questions


> > > Hello, I have some questions about inheritance issues for attributes
in
> > > CALS tables that aren't very clear to me from the spec I've been using
> > > (http://www.oasis-open.org/specs/a502.htm) or other sources I have
seen on
> > > the 'net.  Let's say I have the following table:
> > >
> > > <table>
> > >   <tgroup align="center" cols="3">
> > >     <colspec colname="c1" colsep="0" />
> > >     <colspec colname="c2" align="right" />
> > >     <colspec colname="c3" align="right" />
> > >     <tbody>
> > >       <row rowsep="0">
> > >         <entrytbl cols="2" colname="c1">
> > >           <tbody>
> > >             <row>
> > >               <entry> A.1 </entry>
> > >               <entry> A.2 </entry>
> > >             </row>
> > >             <row>
> > >               <entry> A.3 </entry>
> > >               <entry> A.4 </entry>
> > >             </row>
> > >           </tbody>
> > >         </entrytbl>
> > >         <entry colname="c2"> B </entry>
> > >         <entry> C </entry>
> > >       </row>
> > >     </tbody>
> > >   </tgroup>
> > > </table>
> > >
> > > My first question is whether the "A.x" entries should inherit the
> > > rowsep="0" (from their common <row> ancestor), the colsep="0" (from
the
> > > <colspec> referenced in the <entrytbl>), and the align="center" (from
> > > their <tgroup> ancestor)? In other words, do such attributes "reset"
at
> > > the <entrytbl> level, or do they continue being inherited all the way
up?
> > > If they "reset", would the "A.x" entries inherit any attributes
defined in
> > > <table>?
> >
> > The answer is no, according to the CALS table spec at
> > http://www.oasis-open.org/specs/a502.htm
> >
> > "Within an <entrytbl>, inheritance for an <entry> is from <entrytbl> (or
its
> > <thead> if the <entry> is also in it) instead of <tgroup>, and cannot be
> > from <thead> or <tfoot> of that <tgroup>."
>
> Thanks very much for your answer, though I'm not completely sure if that
> "no" was for all my instances (since the text you quoted from the spec
> doesn't explicitly mention <row>, <colspec>, or <table>).  Just to confirm
> things, can I correctly assume that in a table like this:
>
> <table colsep="0">
>   <tgroup cols="2">
>     <colspec colnum="1" colname="c1" align="justify" />
>     <tbody>
>       <row>
>         <entrytbl cols="2" colname="c1" rowsep="0">
>   <tbody>
>     <row>
>       <entry>A.1</entry><entry>A.2</entry>
>     <row>
>     <row>
>       <entry>A.3</entry><entry>A.4</entry>
>     <row>
>   </tbody>
> </entrytbl>
> <entry>B</entry>
>       </row>
>     </tbody>
>   </tgroup>
> </table>
>
> .. that the A.X entries should inherit rowsep="0" from <entrybl> and
> colsep="0" from <table>, but not align="justify" from the <colspec>
> referenced in <entrytbl>?

The A.X entries will inherit rowsep="0" from entrytbl, but they won't
inherit colsep="0" from the table.  The spec also says that colsep on table
becomes the default value for its tgroups, and an entry in a
entrytbl  does not inherit values from tgroup.  Generally an
entrytbl is a "reset" of the defaults for its contents. It even uses
its own namespace for colnames.

>
> > > My second question is whether the content in the "C" <entry> aligns to
the
> > > right, as defined by the third <colspec>, even though its <entry>
doesn't
> > > specifically reference the third <colspec> via a colname attribute (as
was
> > > done in the "B" <entry> with the second <colspec>)?
> >
> > Yes, it should align right.  The 3rd colspec applies to entry elements
in
> > that column even if it is not referred to by name.
>
> Thanks for confirming this.  I wasn't sure because the spec does say that
> "colspec cannot be referenced without colname", but most examples I've
> seen that use <colspec>s don't always reference them colname attributes in
> their <entry>s.

Certainly the colspec attributes apply to its associated column without
needing
each entry to reference the colname.  That text was in the description of
the
colnum attribute, and I think they meant that if you do reference a colspec
(which you can do from any entry in any column), you cannot reference a
colspec
by column number, you have to use a colname.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net




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