[Home] [By Thread] [By Date] [Recent Entries]
Hi,
At 11:13 PM 5/27/2009, you wrote: Toshihiko Makita wrote: > I am developing DocBook table to XSL-FO stylesheet. It is not > specialized for specific user use. It should be a general stylesheet. Yup: OASIS (CALS) tables. I would very, very strongly recommend using the DocBook XSL stylesheets as a starting point. Even if you donbt use any of their transformations, there is a large library of utility functions contained in them for doing things like figuring out table cell column numbers, alignment, etc.
A set of XSLT 2.0 OASIS/CALS/Docbook table modules would be a fine thing, if the community could share. As for the question, the trick is in defining the specification. The table model is complex to implement, and most implementations (in my experience) don't do the entire thing. Makita-san's description appears to be fairly complete: 1. The table columns are described with colspec element like follows:
I don't think even 4 is impossible, if a column number can be defined as 1 + the sum of all the column spans on preceding sibling cells, falling back to 1 when colspan is not defined: n = 1 + sum(preceding-sibling::entry/t:colspan(.) ) where the function t:colspan() returns the column span for the cell. This is defined on the cell, or if not by means of colspecs when available, or as 1 by default. Indeed, this is effectively what the 1.0 Docbook stylesheets do, except that named templates returning result-tree-fragments have to be used instead of actual functions. Another nice thing offered by this function library would be a set of assertions (XSLT or Schematron) that could check whether a table were "square" (rows all the same length). Cheers, Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|

Cart



