Hi,
I've been asked to convert an a bunch of existing JSPs into XSLT templates. It
all looked easy until I realized that custom tag libs are not that straight
forward to convert. My problem is that with JSP tags it's possible to do stuff
like:
<foo:myframe>
<foo:myheader title="test title"/>
<table>
<tr>
<td>blah.....</td>
</tr>
</table>
</foo:myframe>
The tag <foo:myframe> will elaborate the content within, in this case
<foo:myheader> and <table>, and it will produce a result.
Using XSLT the same mechanism is not possible, having a template that reproduce
the functionality of <foo:myframe>:
<xsl:template name="myframe">
<xsl:param name="title"/>
<html>
<head>
<title>
<xsl:value-of select="$title"/>
</title>
</head>
<body>
<!-- content -->
</body>
</html>
</xsl:template>
I cannot find a way to do:
<xsl:call-template name="myframe">
<xsl:with-param name="title">Test</xsl:with-param>
<table>
<tr>
<td>blah.....</td>
</tr>
</table>
</xsl:call-template>
to populate the "<!-- content -->" part.
Do I necessarely need to pass the content as a parameter like:
<xsl:variable name="content">
<table>
<tr>
<td>blah.....</td>
</tr>
</table>
</xsl:variable>
and
<xsl:call-template name="myframe">
<xsl:with-param name="title">Test</xsl:with-param>
<xsl:with-param name="content" select="$content"/>
</xsl:call-template>
?
Thanks
Alessandro
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list