Re: Omnimark vs. XSL (Saxon) Challenge
Michael M., Looking at your example, I wonder if the CALS model (or some other model) might be according to the XML Exchange Table Model. (There is an article on the site for CALS interpolability.) http://www.oasis-open.org/specs/tm9901.htm Your example is not that clear to me but the documentation on the site might help you. Mike Ferrando Washington, DC --- Michael Müller-Hillebrand <info@xxxxxxxxxxxxx> wrote: > 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: > > <table> > <tbody> > <row> > <entry colspan="2" rowspan="2" width="70%">I</entry> > <entry colspan="2" width="30%">II</entry> > </row> > ... > </tbody> > </table> > > Desired output: > > <table width="48mm 36mm 24mm 12mm"> > <tbody> > <row> > <entry colspan="2" rowspan="2">I</entry> > <entry colspan="2">II</entry> > </row> > ... > </tbody> > </table> > > 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 > > http://cap-studio.de/test/challenge.html > > Thanks a lot, > > - Michael > -- > ________________________________________________________ > Michael Müller-Hillebrand, cap studio, Erlangen, Germany > http://cap-studio.de/en/ > Increase Knowledge Worker's Efficiency using > FrameMaker, XML/XSL, FrameScript, WebWorks Publisher,... > > XSL-List info and archive: > http://www.mulberrytech.com/xsl/xsl-list > __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format