ubsicap / usx

Unified Scripture XML
30 stars 6 forks source link

<cell style> is described as redundant, but I don’t believe it is (it specifies whether the cell is a heading or not) #55

Open chris-morgan opened 1 year ago

chris-morgan commented 1 year ago

https://ubsicap.github.io/usx/elements.html#cell (with emphasis mine):

Like the @​style attribute applied to other USX elements, the cell @​style value is a reference to the source text USFM marker in Paratext, from which USX encoded text is often derived. In USFM text, the table cell markers define the column to which they belong. The variable # represents the table column number. Strictly speaking @​style is redundant information in USX. It is used by Paratext for round-tripping USX to USFM. In USX, the position of a in its sequence defines its respective column, and the @​align attribute is the primary source of cell alignment information.

USFM uses \th# for heading cells, and \tc# for regular cells. The distinction is rather important, since not all tables will have a heading row, so you shouldn’t just say “the first row is headings”. (No idea whether the concept of a heading column is supported, but in theory at least I see no reason why it wouldn’t be.) USX doesn’t convey this distinction in any other way (e.g. I can imagine <cell heading="true">).