Re: [jats-list] Row headers in OASIS table model

Subject: Re: [jats-list] Row headers in OASIS table model
From: "Debbie Lapeyre dalapeyre@xxxxxxxxxxxxxxxx" <jats-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Sep 2022 22:34:38 -0000
> On Sep 14, 2022, at 5:32 PM, Michael Boudreau mboudreau@xxxxxxxxxxxx
<jats-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> We use the OASIS table model in our JATS 1.2 XML for in-house editing with
Arbortext Editor. Is there a way to tag a table row so that the first cell in
the row is designated as a row header, so that this
> <row>
>     <entry>Row header</entry>
>     <entry>Some value</entry>
>     <entry>Another value</entry>
> </row>
> can be converted to this
> <tr>
>     <th scope="row">Row header</th>
>     <td>Some value</td>
>     <td>Another value</td>
> </tr>


Not directly. OASIS <tgroup>s hold both <header> and <body>
elements, but OASIS table header elements are COLUMN
headers and you want a ROW header. That is, the OASIS
headers are not in the same row; they expect the header
to be its own (first) row.  So here is a typical OASIS table,
which does NOT help you a bit:

<tgroup cols="3">
<colspec colnum="1" .../>
<colspec colnum="2" .../>
<colspec colnum="3" .../>
<entry>Row header</entry>
<entry>Some value</entry>
<entry>Another value</entry>


How do you recognize an entry that needs to become a <th>?
Should every first entry in a row become a <tr>? Only if
it has content? How?


IFF you can ALWAYS recognize a potential row header entry,
you can probably hack this.

I suggest attribute(s) on the first entry in each row, or
however else you are recognizing that you want this entry
to become a <th>.

You might want to just set up your @scope attribute.

The attributes that already attach to <entry> are:
        colname         NMTOKEN          #IMPLIED
        namest          NMTOKEN          #IMPLIED
        nameend         NMTOKEN          #IMPLIED
        morerows        NMTOKEN          #IMPLIED
        colsep          %yesorno;        #IMPLIED
        rowsep          %yesorno;        #IMPLIED
        align           (left|right|center|justify|char)        #IMPLIED
        char            CDATA            #IMPLIED
        charoff         NMTOKEN          #IMPLIED
        valign          (top|middle|bottom)                     #IMPLIED

And there also is a parameter entity (%tbl.entry.att;) that lets you
add any attributes you want. You need to set the parameter entity
in a customization module or in the DTD BEFORE calling the OASIS table model.

It would be easy enough to add a @scope attribute, but
if the value is not always "row", I do not know how you
would decide the value.

Hope this helps. CALS is just not set up in the way
you would like it to be.


Deborah A Lapeyre		mailto:dalapeyre@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.
Rockville, MD 20851		Phone: 301-315-9631 (USA)
Mulberry Technologies: Consultancy for XML, XSLT, and Schematron

Current Thread