By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,018 Members | 885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,018 IT Pros & Developers. It's quick & easy.

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

P: n/a
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"

<!-- 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 -->
<basefont face="Verdana" size="2" />

<!-- apply the HEADER template -->
<xsl:apply-templates select="hashref/item[@key='HEADER']"/>
*** below is the imported style sheet

<xsl:stylesheet version="1.0"

!-- this is the matching template for the header -->
<xsl:template match="hashref/item[@key='HEADER']">
<table border="1" cellpadding="0" cellspacing="0" bgcolor="navy"
<tr align="center"> <th colspan="2" backgroud="navy"><font size="3"
color="white" face="arial"> <xsl:value-of
select="/perldata/arguments/report_name"/> GROUP

<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"
<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 align="left">
<th bgcolor="teal"><font color="#FFFFE6" face="arial" size="2">Total
Tests:</font></th><th bgcolor="#FFFFE6"><font face="arial" color="teal"
<!-- for spacing purposes between tests -->
<table border="0"><tr><td></td></tr><tr><td></td></tr></table>
<!-- for spacing purposes between tests -->
<table border="0"><tr><td></td></tr><tr><td></td></tr></table>


Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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..

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.