[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Omnimark vs. XSL (Saxon) Challenge

Subject: RE: Omnimark vs. XSL (Saxon) Challenge
From: Michael Müller-Hillebrand <info@xxxxxxxxxxxxx>
Date: Wed, 17 Mar 2004 10:09:08 +0100
td rows
At first,

thank you to all contributors up to now! I am going to incorporate as much as possible of what I have learned form your posts up to now.

Andrew, I fear, your solution, which I tried and studied -- and I learned from it! --, does not work properly if there is a rowspan in the table, which forces a cell in the next row to be pushed to the right. In your input sample there are only rowspans at the end of rows, so you can quite accurately calculate the column number form the preceding-siblings. Using the input below you get different length rows and cells with identical row/col attributes.

This input:

<table>
   <tr>
      <td colspan="2" rowspan="2" width="70%">I</td>
      <td colspan="2" width="30%">II</td>
   </tr>
   <tr>
      <td width="20%">III</td>
      <td rowspan="3" width="10%">IV</td>
   </tr>
   <tr>
      <td colspan="3" width="90%">V</td>
   </tr>
   <tr>
      <td width="40%">VI</td>
      <td width="30%">VII</td>
      <td width="20%">VIII</td>
   </tr>
</table>

using the XSL at

http://www.biglist.com/lists/xsl-list/archives/200402/msg00447.html

creates this final output:

<table border="1">
   <tr>
      <td row="1" col="1">.</td>
      <td row="1" col="2">.</td>
      <td row="1" col="3">.</td>
      <td row="1" col="4">.</td>
   </tr>
   <tr>
      <td row="2" col="1">.</td>
      <td row="2" col="2">.</td>
   </tr>
   <tr>
      <td row="3" col="1">.</td>
      <td row="3" col="2">.</td>
      <td row="3" col="2">.</td>
      <td row="3" col="3">.</td>
   </tr>
   <tr>
      <td row="4" col="1">.</td>
      <td row="4" col="2">.</td>
      <td row="4" col="2">.</td>
      <td row="4" col="3">.</td>
   </tr>
</table>

Thank you so far!

- Michael

On 16.03.2004 (15:56 Uhr +0000), Andrew Welch wrote:

> > 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 put forward a solution to a similar problem a while back:
>
>http://www.biglist.com/lists/xsl-list/archives/200402/msg00447.html
>
>This basically 'normalises' a table to remove the rowspans and colspans.
>The technique is to process the table horizontally to remove the
>colspans and the vertically to remove the rowspans.
>
>For your problem, I would normalise the table into a variable, copying
>through any width values that are for a single cell (that is, a width
>value on an <entry> with no colspan specified).  You should then have at
>least one definite width value per column.
>
>The processing complexity should be proportional to your input, rather
>than exponential (which Im guessing your solution is) so you should
>notice a dramatic performance improvement.

-- 
_____________________________________________________________
Dipl.-Ing. Michael Müller-Hillebrand
 ????????????????????????????????????
"Mehr Effizienz für Wissensarbeiter" --> http://cap-studio.de

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.