[xsl] Omnimark vs. XSL (Saxon) Challenge

Subject: [xsl] Omnimark vs. XSL (Saxon) Challenge
From: Michael Müller-Hillebrand <info@xxxxxxxxxxxxx>
Date: Tue, 16 Mar 2004 15:06:35 +0100
Dear experts,

Recently I was quite unimpressed by the presentation of an Omnimark script requiring 32 seconds to make what seemed like a little change to a 2000 cells table. I said, this would be possible with XSL as well, and suddenly I found myself challenged.

After some hours I have a working solution but it is so slow... I hope I have missed something important with my method and now I am seeking assistance.

The task seemed simple at first:

HTML tables usually have width attributes for each cell. CALS and some other table models require all column widths to be specified at the top level, e.g. as an attribute of the table element. 

Input table:

      <entry colspan="2" rowspan="2" width="70%">I</entry>
      <entry colspan="2" width="30%">II</entry>

Desired output:

<table width="48mm 36mm 24mm 12mm">
      <entry colspan="2" rowspan="2">I</entry>
      <entry colspan="2">II</entry>

The main problem is the use of colspan and rowspan, which makes it hard for any cell to know to which column it belongs. One has to render the table from start to finish to learn that for each cell.

I read about Michael Kay's "Knight's Tour Stylesheet" and created a very recursive similar thing. I recursively loop through all rows, through all cells, within spanned cells through all rowspans and then through all colspans.

I would very much appreciate any comments and will gladly summarize.

Please find links to the stylesheet and sample files at 


Thanks a lot,

- Michael
Michael Müller-Hillebrand, cap studio, Erlangen, Germany
Increase Knowledge Worker's Efficiency using
FrameMaker, XML/XSL, FrameScript, WebWorks Publisher,...

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread