From: "Daniel Brauer" <daniel(_dot_)brauer(_at_)img-online(_dot_)de>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: [xsl] generating fragments of HTML tables from different templates
Date: Mon, 20 Oct 2003 14:47:52 +0200
Hi,
I need to generate fragments of a HTML table from different templates.
something like:
<xsl:template name="t1">
<table>
<tr>
<td> cell1 </td>
<xsl: call-template name="t2" select="."/>
</table>
</xsl:template>
<xsl:template name="t2">
</tr>
<xsl:for-each select="*">
<tr>
<td> another-cell </td>
</tr>
</xsl:for-each>
</xsl:template>
I know this example doesnt make much sense...
Anyway when I try to run this styleheet with Saxon 6.5.2 I get an error
message telling me that the Stylesheet is not wellformed.
Can this behaviour be switched off or is it generally not possible to
generate fragmented HTML code from mutliple templates.
Thanks
Daniel.
No, your stylesheet must be well-formed xml. Why don't you move the closing
tr tag into the first template? If this can't be done you need to re-think
your logic to fit in with the outputing nodes mentality not tags/half-tags.
Can you describe your needs and we'll how to re-form your template?
--
Joe (MVP -xml)
_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list