[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Converting TabLibs into XSLT

Subject: Converting TabLibs into XSLT
From: "alessandro.dibella" <alessandro.dibella@xxxxxxxxxx>
Date: Tue, 06 Jan 2004 18:34:57 +0100
alessandro dibella
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.