Re: [xsl] Calling sections of XSL file seperately.

Subject: Re: [xsl] Calling sections of XSL file seperately.
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sat, 13 Apr 2002 00:32:16 +0100
Hi Kiran,

> Is there is a way to refer a particular section of XSL with a name
> and call that part at a different location.

Yes. You can create a template with a name, and then call that
template. A named template is like a normal template, except it has a
name (in the name attribute):

<xsl:template name="aName">
  ...
</xsl:template>

And you can call it from wherever you like using xsl:call-template:

  <xsl:call-template name="aName" />

Like xsl:apply-templates, you can pass parameters when you call a
a template by name.

The current node within the template is the same as the current node
at the point where you call the template.

I'm not sure whether that helps you with what you're trying to
achieve, but I hope that's the kind of thing you were after.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread