empty table problem

Hi all,
I have a XML document like this:

....
<documents>
    <document>
        ...
    </document>
    <document>
        ...
    </document>
</documents>

and a xsl like this:

<fo:block space-after="12">
			<fo:table table-layout="fixed" width="100%" border="1"
border-style="solid" border-color="#55A0dd">
				<fo:table-column />
				<fo:table-body>
						<xsl:apply-templates select="documents/document" />
				</fo:table-body>
			</fo:table>

		</fo:block>
.....

<xsl:template match="documents/document">
		<fo:table-row>
			<fo:table-cell>
				<fo:block font-size="8pt">
					<xsl:value-of select="name" />
				</fo:block>
			</fo:table-cell>
		</fo:table-row>
	</xsl:template>

the problem is when the tag <documents> doesn't contain any <document> tag,
so the table header is created but no row added. error:
fo:table-body is missing child elements. 

How could I manage this so when no document tag exists inside documents tag
nothing would  be displayed?
thanks!

-- 
View this message in context: http://www.nabble.com/empty-table-problem-tp20012801p20012801.html
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.

Received on Thursday, 16 October 2008 16:51:23 UTC