I18N-ISSUE-478: determining cell text direction [tabular-data-model]

I18N-ISSUE-478: determining cell text direction [tabular-data-model]

http://www.w3.org/International/track/issues/478

Raised by: Richard Ishida
On product: tabular-data-model

follow this at 
https://github.com/w3c/csvw/issues/620
====




the 'base direction' of a string is crucial to correct display when dealing with bidirectional text (see http://www.w3.org/International/articles/inline-bidi-markup/uba-basics for an explanation of why). The base direction can be determined by metadata (such as the dir attribute in html) or by testing the data (typically identifying the direction of the first strong character). The latter approach does not always produce the correct base direction, eg. where latin characters appear at the start of a bidirectional string.

as far as i can tell, the overall 'direction' annotation for the table, sets the direction of columns on display, but is not used to set the default direction of text in cells.

6.4 Parsing Cells says that the cell annotation for text direction takes its value from the column annotation for text direction.

it seems, then, that it is possible to indicate that the direction of all cells in a particular column should be, say, rtl, by specifying direction for that column.

it's not clear to me whether the last paragraph in 6.5.1 is contradicting this by suggesting that the presence of strong characters in the cell will cause the UBA's first-strong algorithm to kick in, or simply that the contents of the cell will be treated as normal by the UBA, given the base direction set by the 'text direction' cell annotation. I'm particularly unclear, since the preceding sentence seems to be applying different rules for strings with no strong characters, and is followed by 'However...'.

here are some thoughts/issues/questions:

i would have thought that it would be easier to use the direction annotation of the table to establish the default base direction for cell values, rather than only being able to specify it per column. (Then it would be analogous to the dir attribute on the html element.)

i also think it may be useful sometimes to specify the direction for a given row.

if the direction of a table is not set, or the direction is set to auto/default, then i would expect that the first-strong algorithm would be applied to cells to determine the base direction.

on the other hand, if the direction of a cell is specified by an annotation, then the cell should probably take its direction from that.

am i correct in thinking that it is also possible to use metadata to set the direction for a particular cell? If so, then the algorithm should not overwrite that with the value in the column annotation.

Received on Tuesday, 16 June 2015 05:21:41 UTC