View Single Post
  #1 (permalink)  
Old June 8th, 2005, 04:33 PM
orrery orrery is offline
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating table from cards

I have an XML file that contains a root element and a many "card" elements. For simplicity, we can assume that a card contains a single line of text. I need help with creating an XSLT stylesheet that will sandwich the cards (to be called "cells" when transformed) in groups of 3 within a "row" element, and groups of 3 row elements within a table element. So I want to achieve something like:
<tables>
  <table>
    <row>
       <cell>Sentence 1.</cell>
       <cell>Sentence 2.</cell>
       <cell>Sentence 3.</cell>
    </row>
    <row>
        ...
    </row>
    <row>
        ...
        <cell>Sentence 9.</cell>
    </row>
  </table>
  <table>
        <cell>Sentence 10.</cell>
    ...
  </table>
  ...
</tables>

Suggestions? Thanks for your help.



Chris