[xsl] Table error

Subject: [xsl] Table error
From: "James Steven" <JSteven@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 9 Sep 2004 16:33:30 +0100
Hello
I have the following xml:

<root>
  <Table name="abc">
    <Column name="987">
      <Value>h</Value>
    </Column>
    <Column name="123">
      <Value>a</Value>
    </Column>
    <Column name="456">
      <Value>g</Value>
    </Column>
  </Table>

  <Table name="ghi">
    <Column name="jkl">
      <Value>5</Value>
    </Column>
  </Table>

  <Table name="mno">
    <Column name="pqr">
      <Value>7</Value>
    </Column>
   <Column name="1011">
      <Value>p</Value>
    </Column>
  </Table>

  <Table name="stu">
    <Column name="vwx">
      <Value>3</Value>
    </Column>
  </Table>
</root>

Using this I would like to create a table like that below:

abc
Column   Value
987       h
123       a
456       g

ghi
Column   Value
jkl       5

mno
Column   Value
pqr	    7
1011      p

stu
Column   Value
vwx       3

At the moment I have the xsl-fo shown below which keeps producing a
'Expecption in thread "main" jave.lang.OutofMemoryError' at the command
prompt when run with the xml.  It works if I remove the 'Column' and
'Values' headings in xsl or if I leave those in and remove each Table name.
Please mail back if you can suggest how I can resolve this!  Thanks.


<xsl:template match="ROOT">
			<fo:root>

				 <fo:page-sequence master-reference="first.page">



<!-- ================================ PAGE BODY
================================-->
<fo:flow flow-name="xsl-region-body">
<fo:block xsl:use-attribute-sets="orderlist.block">
<fo:block xsl:use-attribute-sets="orderlist.table.block">
<fo:table table-layout="fixed">
<fo:table-column column-width="100mm"/>
<fo:table-column column-width="100mm"/>

<fo:table-body>
<xsl:for-each select="Table">
 <fo:table-row>
    <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
	 <fo:block xsl:use-attribute-sets="orderlist.table.detail.blocks">
		 <xsl:value-of select="@Name"/>
	    </fo:block>
	   </fo:table-cell>
      </fo:table-row>
     <fo:table-row>
         <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
              <fo:block text-align="center" font-size="10pt"
font-family="serif">
		     Column
	        </fo:block>
	    </fo:table-cell>
	   <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
		 <fo:block text-align="center" font-size="10pt" font-family="serif">
			Values
		</fo:block>
	   </fo:table-cell>
      </fo:table-row>
<xsl:for-each select="Column">
   <fo:table-row>
	  <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
	     <fo:block xsl:use-attribute-sets="orderlist.table.detail.blocks">
		    <xsl:value-of select="@Name"/>
	       </fo:block>
	  </fo:table-cell>
	 <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
	       <fo:block xsl:use-attribute-sets="orderlist.table.detail.blocks">
		      <xsl:value-of select="./Value"/>
		 </fo:block>
	  </fo:table-cell>
    </fo:table-row>
</xsl:for-each>
</xsl:for-each>
    </fo:table-body>
</fo:table>
</fo:block>
</fo:block>

</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>

Current Thread