On 20/09/12 02:05, Glenn Adams wrote: > On Thu, Sep 20, 2012 at 3:15 AM, Vincent Hennebert wrote: > >> I’ve started to work on this. Any feedback about the proposed extension >> from any interested party will be most welcome. >> >> Thanks, >> Vincent >> >> On 19/09/12 12:22, bugzi...@apache.org wrote: >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=53902 >>> >>> Priority: P2 >>> Bug ID: 53902 >>> Summary: Add scope to header table cell >>> >>> In XSL-FO, header table cells (fo:table-cell elements that descend from >> an >>> fo:table-header/footer object) inherently encompass a column of the >> table. This >>> is due to the way tables are broken down into fo:table-header, >> fo:table-body >>> and fo:table-footer. >>> >>> There is no XSL-FO construct to say that a table-cell is a header cell >>> encompassing a /row/ of the table. It can be achieved graphically by >> e.g., >>> using a bold font for the first cell of a row, but the structure won't >> reflect >>> that. >>> >>> This becomes a problem when creating accessible PDF documents, where it >> is >>> desirable to store the scope of a header in the logical structure. PDF >> defines >>> the standard Scope attribute for that (see Section 10.7.5 of the PDF 1.5 >>> Reference). >>> >>> I propose to add an extension property to fo:table-cell in order to >> convey that >>> information. Along with setting the 'role' property to 'TH', it would >> become >>> possible to define a cell as being a header cell with a scope of Row. >> Something >>> like this: >>> <fo:table-cell role="TH" fox:scope="Row"> >>> ... >>> </fo:table-cell> >>> >>> The fox:scope property would have an enumerated value of 'Column' >> (default), >>> 'Row' or 'Both'. >> >> > my only suggestion would be to use lower case only when specifying values > for these attributes, and also 'TH' should be expanded to an english word, > like 'head' or 'header'; also, i'm not sure why two attributes are needed, > when one fox attribute could do the job
The ‘role’ property can be used not just by fo:table-cell, but also for any other element in order to override the default mapping to a PDF structure type. Its value should be a standard structure type as listed in Section 10.7.5 of the PDF 1.5 Reference. We could imagine to use plain English words instead but I prefer to leave things this way to avoid confusion and keep the code simple. I guess the scope could be coded in the ‘role’ property, something like ‘TH-Row’, but again, I’d like to keep the code simple. Also, it seems more XSL-FO idiomatic to me to define the scope in a separate property. Thanks, Vincent