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

RE: call-template vs apply-template

Subject: RE: call-template vs apply-template
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Mon, 7 Jun 2004 08:00:20 +0300
call template apply template
Hi,

> I want to call template "abc" with element "def"
> 
> Here's the syntax for "call-template" and "apply-template":
> 
> <xsl:call-template name="abc"/>
> 
> <xsl:apply-templates select="def"/>
> 
> 
> However, I dun seem to be able to combine the two above statement.
> 
> Currently as a workaround, I find myself using the below (for just 1
> element).
> 
>   <xsl:for-each select="def">
>     <xsl:call-template name="abc"/>
>   </xsl:for-each>
> 
> 
> Is there a better way? How should I do it?

Use

  <xsl:template name="abc" match="def">

but if you cannot, then the xsl:for-each to change the current context is the way to go.

Cheers,

Jarno - Grendel: Zombie Nation

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.