[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Converting TabLibs into XSLT
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|