473,396 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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>

Jul 20 '05 #1
1 2200
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Duane Morin | last post by:
I've inherited an XSL transform that I need to squeeze every last millisecond out of (since it's running several hundred thousand times). I've noticed that there are 26 match clauses in the file....
6
by: Rainer Herbst | last post by:
Hi *, please consider the following problem: I have a XML document which includes some html elements. I want to replace only the <div> element: I specified two templates, one matches...
0
by: Carl | last post by:
Hi, I have found a way to map attributes (columns) to column headings. But this runs really slow. Is there a way to improve it? Thanks, Carl <?xml version="1.0" encoding="utf-8" ?>...
3
by: Phil | last post by:
Hi everybody, I am a XSLT beginner and the following problem really makes me crazy ! I have a main "contacts.xml" document which contains references to several contact data XML files. My aim...
3
by: Zhou Lei | last post by:
Hello now I'm writing the XSL to transform the XML to an html file, and some xml elements are: <user login="loginname"> <name>James Cook</name> </user> I need to include the login attribute...
1
by: johkar | last post by:
Is there any way to conditionally import XSL files? If I have to import all the possible pages and then conditionally call the right template, will importing all the templates cause application...
1
by: lele1979 | last post by:
Hi XSL Community, I would do a file in PDF with FO and XSL/XML tecnology. In a precisely moment of a creation of this PDF file I must call a precisely template from a precisely XSL file, that...
2
by: sandra55 | last post by:
Hi, I need to include different stylesheets in my stylesheet so that I can use their stylesheet. However, as soon as I have my stylesheets in different files, it does not work anymore. But they...
1
by: Himself | last post by:
I apologize if this has been answered before, I couldn't find it. I'm trying to transform XML to XML and specify a schema in the output XML. I am transforming nodes to different local names...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.