call template function called from another xml file?

B

bjam

Hi, if I want to include a set of call template methods into my xsl
file can I do that? Meaning I want to have the template method below
of data_output in another file that I can use in several other xsl
files when needed. This would be similar to an inclue mindset in C++
or a import in java. Any help is greatly appreciated. Below I would
like the "data_output" template call to be imported so to speak or come
from another xsl file, can this be done using the document method?


<xsl:template
match="//item[@key='SUMMARY']/*/item[@key='non_viewable']/*/item[@key='aggregate_result'][text()='true']">
<xsl:call-template name="data_output"/>
</xsl:template>

<!-- data output -->
<xsl:template name="data_output">
<tr>
<xsl:for-each
select="ancestor::hashref/item[@key='viewable']/hashref/item">
<a>
<xsl:attribute name="href">
http://lx-dgdev51:8080/cgi-bin/<xsl:value-of
select="/perldata/arguments/display_cgi"/>?file=<xsl:value-of
select="/perldata/arguments/file"/>&amp;xsl=<xsl:value-of
select="/perldata/arguments/target_xsl"/>&amp;test=<xsl:value-of
select="../../../item[@key='non_viewable']/hashref/item[@key='test_value']"/>
</xsl:attribute>
<th align='left' bgcolor="lightblue">
<font color="navy" face='arial' size='2'>
<xsl:value-of select="text()"/>
</font>
</th>
</a>
</xsl:for-each>
</tr>
</xsl:template>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top