B
bjam
Hi, today I was able to abstract out into a separate xsl file a
template that I specifically perform a call templates for, this worked
with import no problem. However, when trying to do the same operation
with a template that I use a match template on, IE was giving me the
following error for the style sheet. Does anyone know how to import or
include a match template versus a call named template? Thanks in
advance for your help
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Keyword xsl:stylesheet may not contain PCDATA nodes. Error occurred
during compilation of included or imported stylesheet...
*** here is the the style sheet for both the import and calling of the
imported template
<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
-->
<xsl:import href="dqm_dataoutput_template.xsl"/>
<!-- import the header template for displaying summary header -->
<xsl:import href="dqm_summary_header_template.xsl"/>
<!-- root template -->
<xsl:template match="perldata">
<!-- open the html -->
<html>
<basefont face="Verdana" size="2" />
<body>
<!-- apply the HEADER template -->
<xsl:apply-templates select="hashref/item[@key='HEADER']"/>
*** below is the imported style sheet
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
!-- this is the matching template for the header -->
<xsl:template match="hashref/item[@key='HEADER']">
<!-- HEADER TITLE -->
<table border="1" cellpadding="0" cellspacing="0" bgcolor="navy"
width="35%">
<tr align="center"> <th colspan="2" backgroud="navy"><font size="3"
color="white" face="arial"> <xsl:value-of
select="/perldata/arguments/report_name"/> GROUP
SUMMARY</font></th></tr>
<!-- HEADER SECTIONS -->
<tr align="left">
<th bgcolor="teal"><font color="#FFFFE6" face="arial" size="2">Report
Name:</font></th><th bgcolor="#FFFFE6"> <font face="arial" color="teal"
size="2"><xsl:value-of
select="/perldata/arguments/report_name"/></font></th>
</tr>
<tr align="left">
<th bgcolor="teal"><font color="#FFFFE6" face="arial" size="2">Last
Run:</font></th><th bgcolor="#FFFFE6"> <font face="arial" color="teal"
size="2"><xsl:value-of select="/perldata/arguments/time"/></font></th>
</tr>
<tr align="left">
<th bgcolor="teal"><font color="#FFFFE6" face="arial" size="2">Total
Tests:</font></th><th bgcolor="#FFFFE6"><font face="arial" color="teal"
size="2"><xsl:value-of
select="/perldata/arguments/total_tests"/></font></th>
</tr>
</table>
<!-- for spacing purposes between tests -->
<table border="0"><tr><td></td></tr><tr><td></td></tr></table>
<hr/>
<!-- for spacing purposes between tests -->
<table border="0"><tr><td></td></tr><tr><td></td></tr></table>
</xsl:template>
</xsl:stylesheet>
template that I specifically perform a call templates for, this worked
with import no problem. However, when trying to do the same operation
with a template that I use a match template on, IE was giving me the
following error for the style sheet. Does anyone know how to import or
include a match template versus a call named template? Thanks in
advance for your help
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Keyword xsl:stylesheet may not contain PCDATA nodes. Error occurred
during compilation of included or imported stylesheet...
*** here is the the style sheet for both the import and calling of the
imported template
<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
-->
<xsl:import href="dqm_dataoutput_template.xsl"/>
<!-- import the header template for displaying summary header -->
<xsl:import href="dqm_summary_header_template.xsl"/>
<!-- root template -->
<xsl:template match="perldata">
<!-- open the html -->
<html>
<basefont face="Verdana" size="2" />
<body>
<!-- apply the HEADER template -->
<xsl:apply-templates select="hashref/item[@key='HEADER']"/>
*** below is the imported style sheet
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
!-- this is the matching template for the header -->
<xsl:template match="hashref/item[@key='HEADER']">
<!-- HEADER TITLE -->
<table border="1" cellpadding="0" cellspacing="0" bgcolor="navy"
width="35%">
<tr align="center"> <th colspan="2" backgroud="navy"><font size="3"
color="white" face="arial"> <xsl:value-of
select="/perldata/arguments/report_name"/> GROUP
SUMMARY</font></th></tr>
<!-- HEADER SECTIONS -->
<tr align="left">
<th bgcolor="teal"><font color="#FFFFE6" face="arial" size="2">Report
Name:</font></th><th bgcolor="#FFFFE6"> <font face="arial" color="teal"
size="2"><xsl:value-of
select="/perldata/arguments/report_name"/></font></th>
</tr>
<tr align="left">
<th bgcolor="teal"><font color="#FFFFE6" face="arial" size="2">Last
Run:</font></th><th bgcolor="#FFFFE6"> <font face="arial" color="teal"
size="2"><xsl:value-of select="/perldata/arguments/time"/></font></th>
</tr>
<tr align="left">
<th bgcolor="teal"><font color="#FFFFE6" face="arial" size="2">Total
Tests:</font></th><th bgcolor="#FFFFE6"><font face="arial" color="teal"
size="2"><xsl:value-of
select="/perldata/arguments/total_tests"/></font></th>
</tr>
</table>
<!-- for spacing purposes between tests -->
<table border="0"><tr><td></td></tr><tr><td></td></tr></table>
<hr/>
<!-- for spacing purposes between tests -->
<table border="0"><tr><td></td></tr><tr><td></td></tr></table>
</xsl:template>
</xsl:stylesheet>