xml import / include for a match template vs. call?

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>
 
B

bjam

Forget it... thanks though... this board is making me help myself as I
re-read over my message here I noticed a missing bracket.... anyway,
XML SPY is not that good .... as it did not find this error for me...
has anyone used XML SPY effectively?? I am pretty new to this tool and
it sometimes helps and sometimes doesn't. Pretty much gvim and syntax
highlighting are my code syntax checkers... yours? Thanks again for
taking the time to read my bablel bable..
 

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,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top