473,659 Members | 3,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:styleshe et 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_datao utput_template. xsl"/>

<!-- import the header template for displaying summary header -->
<xsl:import href="dqm_summa ry_header_templ ate.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:styleshe et 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="#FFFFE 6"> <font face="arial" color="teal"
size="2"><xsl:v alue-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="#FFFFE 6"> <font face="arial" color="teal"
size="2"><xsl:v alue-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="#FFFFE 6"><font face="arial" color="teal"
size="2"><xsl:v alue-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 2213
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
2300
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. They are 13 pairs that each check the same condition, like this: <xsl:template match="A/foo"> .... <xsl:template match="B/foo"> .... <xsl:template match="A/bar">
6
4432
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 everything ("*"), one matches only the "div". As far as I understand, the most specific rule should apply, i.e. the div rule if the element is a <div>.
0
2178
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" ?> <?xml-stylesheet type="text/xsl" href="stylesheet.xslt"?>
3
2117
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 is to process the contacts in a single-pass XSLT process. That is why the "document()" function is what I need. I call the "document()" XPath function from a "for-each" instruction.
3
1543
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 value in my target HTML file, and concatenate the value with @my.addr.com. So my target HTML code will be
1
1238
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 overhead or slowness? John
1
1680
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 I have already included. The name of this template is the same that from a file XML.
2
1445
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 do work when they are implemented in the same file. So I think there is something wrong with the way I include the files or call them. This is how i do it: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
1
8120
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 while keeping the same namespace. This works fine, until I try to introduce the schema. My input looks like this: <a xmlns="some_url"> <b>doo dah</b>
0
8337
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8748
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8531
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8628
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7359
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.