This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Calling sections of XSL file seperately.
- From: "KUMAR NINGASHETTY" <kningashetty at deltafunding dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 12 Apr 2002 19:12:56 -0400
- Subject: Re: [xsl] Calling sections of XSL file seperately.
- Reply-to: xsl-list at lists dot mulberrytech dot com
Are you talking bout calling XSL's in different sections like "functions" you see in a regular programming language ...
Then its using call-templates ... in the following structure ..
<xsl:template match="/">
.
.
<xsl:call-template name="AAA">
<!-- to pass args -->
<xsl:with-param name="a" select="from_your_source_xmlNode"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="AAA">
<xsl:param name="a"/>
<!-- Your rest of html and xsl logic below -->
</xsl:template>
You can also have this template in a separate file by using "include"
-Kumar
>>> kiran@mentorware.com 04/12/02 06:39PM >>>
Hi,
Is there is a way to refer a particular section of XSL with a name and call that part at a different location.
I need to display a HTML, which I am keeping in a section of the XSL page.
Depending on the values of the parameters I am passing, I want to call that section at different locations. To elaborate:
My final html file can look like
1
A
I am here
B
2
3
Or it can look like
1
2
A
I am here
B
3
In the first case I am passing the values 1, A and in the second case
2, A.
The section I want to call is the one which has the HTML for display 1A or 2A.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list