This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Complex named template calling
- To: XSL-List at mulberrytech dot com
- Subject: Complex named template calling
- From: "Stephen Kim" <pooplets at hotmail dot com>
- Date: Wed, 22 Nov 2000 14:30:14 -0500
- Reply-To: xsl-list at mulberrytech dot com
I'm attempting to write a set of XSLs, one of which controls
look/appearance.
For example, there will be template that resembles the following:
<xsl:template name="TABLEDEF">
<table>
<xsl:apply-templates/>
<table>
</xsl:template>
<xsl:template name="DATADEF">
<b>
<xsl:apply-templates/>
<b>
</xsl:template>
Now, I want these templates to be called from various places over xml with
wide differences.
<xsl:for-each select="AUTHOR">
<xsl:call-template name="TABLEDEF">
<TR>
<TD>NAME</TD>
<TD>
<xsl:for-each select="BOOK">
<xsl:call-template name="DATADEF"/>
<br/>
</xsl:for-each>
</TD>
</TR>
</xsl:call-template>
</xsl:for-each>
I know this is non-functional as call-templates cannot handle subelements
besides params. Is there a way to simulate this functionality somehow?
Thanks
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list