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

Re: Complex named template calling

Subject: Re: Complex named template calling
From: "Juan R. Migoya" <jmigoya@xxxxxxxxxxx>
Date: Thu, 23 Nov 2000 08:12:37 +0100
xsl node as parameter template
Couldn't you pass the node as parameter?

<xsl:template name="DATADEF">
   <xsl:param name="nod" select=".">
    <b>
     <xsl:apply-templates select="$nod"/>
    <b>
</xsl:template>

Regards,

Juan R. Migoya

Stephen Kim wrote:
> 
> 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

************************************************************************
Juan R. Migoya
Ingelectric-Team, S.A.
Area de Aparatos y Equipos
Tel. 94 403 98 30
Fax. 94 403 96 80


 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.