B
bjam
Hi, I am trying to create a sort of include file into my xsl files such
that calling the following template will push these xml tags into my
document such that the other xsl files can use these tags to make
decisions. In this case I want antother template that is going to
create tables be able to call this template in order to get information
for the various table paramaters and then use xsl:attribute to push
items into the table tag. Does anyone know if there is a way to
dynamically create xml tags using xsl in the document such that the
rest of the xsl style sheet processing can use these tags? Below is
the template file I am looking to create ... and further below is it's
usuage.
<!-- please note this is experimental -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- import the data output template for displaying each row of resutls
-->
<!-- table settings -->
<!-- border="0" cellpadding="2" cellspacing="0" bgcolor="lightblue"
width="50%"-->
<xsl:template name="summary_table_specs">
<xml_summary_table cellpadding='2'/>
<xml_summary_table cellspacing='6'/>
<xml_summary_table border='3'/>
<xml_summary_table width='100%'/>
<xml_summary_table bgcolor='lightblue'/>
</xsl:template>
</xsl:stylesheet>
......... usage below
<xsl:import="summary_table.xsl">
<xsl:call-template name="summary_table_specs"/>
<table>
<xsl:attribute href="cellpadding">
<xsl:value-of select="/xml_summary_table[@cellpadding][text()]"/>
</xsl:attribute>
.....
that calling the following template will push these xml tags into my
document such that the other xsl files can use these tags to make
decisions. In this case I want antother template that is going to
create tables be able to call this template in order to get information
for the various table paramaters and then use xsl:attribute to push
items into the table tag. Does anyone know if there is a way to
dynamically create xml tags using xsl in the document such that the
rest of the xsl style sheet processing can use these tags? Below is
the template file I am looking to create ... and further below is it's
usuage.
<!-- please note this is experimental -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- import the data output template for displaying each row of resutls
-->
<!-- table settings -->
<!-- border="0" cellpadding="2" cellspacing="0" bgcolor="lightblue"
width="50%"-->
<xsl:template name="summary_table_specs">
<xml_summary_table cellpadding='2'/>
<xml_summary_table cellspacing='6'/>
<xml_summary_table border='3'/>
<xml_summary_table width='100%'/>
<xml_summary_table bgcolor='lightblue'/>
</xsl:template>
</xsl:stylesheet>
......... usage below
<xsl:import="summary_table.xsl">
<xsl:call-template name="summary_table_specs"/>
<table>
<xsl:attribute href="cellpadding">
<xsl:value-of select="/xml_summary_table[@cellpadding][text()]"/>
</xsl:attribute>
.....