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"/>&xsl=<xsl:value-of
select="/perldata/arguments/target_xsl"/>&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>
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"/>&xsl=<xsl:value-of
select="/perldata/arguments/target_xsl"/>&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>