xsl-list
[Top] [All Lists]

RE: Dynamic Table

2004-12-20 10:37:36
Hi François,

Check out:
http://www.dpawson.co.uk/xsl/sect2/N7450.html

HTH,
<prs/> 

-----Original Message-----
From: François Torche [mailto:torche(_at_)i-minds(_dot_)be] 
Sent: Monday, December 20, 2004 11:21 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Dynamic Table

Hello,

I have a very basic XML document that looks like:
<domain>
  <variable> abc </variable>
  <variable> def </variable>
  <variable> ghi </variable>
  <variable> abcdefgh </variable>
  <variable> abcdef </variable>
  <variable> abc </variable>
  ...
</domain>

And I would like to create an HTML table with, for example, 3 columns. Each
column can contain 3 characters max. The result of my transformation should
look like:
<table>
  <tr>
    <td> abc </td>
    <td> def </td>
    <td> def </td>
  </tr>
  <tr>
    <td colspan = "3"> abcdefgh </td>
  </tr>
  <tr>
    <td colspan = "2"> abcdef </td>
    <td> abc </td>
  </tr>
</table>

I don't have a clue how to dynamically determine the colspan attribute and
start a new row if there is not enough room to put the content of a
variable.

Many thanks in advance for your help,
François

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>