This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how to call templates from diff stylesheets conditional ly.
- To: Wate at wisor dot com
- Subject: Re: [xsl] how to call templates from diff stylesheets conditional ly.
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Mon, 30 Apr 2001 23:19:20 +0100
- CC: xsl-list at lists dot mulberrytech dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <215610B33CDBD4118F260050DA91EE062B6F98@PHOENIX>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Shirish,
> I have these templates with different names.
Then all you need to do is import the stylesheets into the master.xsl:
<xsl:import href="s1.xsl" />
<xsl:import href="s2.xsl" />
This makes the templates held within the s1.xsl and s2.xsl stylesheets
available within master.xsl. You said you had a test, a condition
about which one to call? Then you can use:
<xsl:choose>
<xsl:when test="...">
<xsl:call-template name="foo" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="bar" />
</xsl:otherwise>
</xsl:choose>
I'm afraid that I might be missing something about what you're doing
that's causing you a problem. If this doesn't help, please give more
details.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list