Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Trouble with xsl
Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
StarGateSG-1




PostPosted: Mon Apr 24, 2006 8:37 am   Post subject: Trouble with xsl

Hello,

I am having a problem with this xsl file, for some reason (below) it doesn't load, yet all my other files work and they are off the same templete.

Here is the Error:
code:
The following tags were not closed: xsl:stylesheet, xsl:template. Error processing resource 'file://S205fs/0051400/Grade 12 Programming/Program/Quick_Report.xsl'.


Here is the code:
This is Quick_Report_Data.xml
code:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="Quick_Report.xsl"?>
<Quick_Report>

        <Last_Week_Attend>100</Last_Week_Atend>
       
        <Last_Month_Attend>80</Last_Month_Attend>
       
        <Yesterday_Attend>45</Yesterday_Attend>
       
        <Total_Students>900</Total_Students>
       
</Quick_Report>


This is Quick_Report.xsl
code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<head>
<style type="text/css">
th{text-align: center}
td{text-align: center}
</style>
<title>Attendance Report by Period</title>
</head>
<body>
<h2>Attendance Report Summary</h2>
<table border="1">
<tr>
<th>Time Frame</th>
<th>Total Students</th>
<th>Students in Attendance</th>
</tr>
<tr>
<th>Yesterdays Attendance</th>
<td>#<xsl:value-of select="Quick_Report/Total_Students"/></td>
<td><xsl:value-of select="Quick_Report/Yesterday_Attend"/></td>
</tr>
<tr>
<th>Last Weeks Attendance</th>
<td>#<xsl:value-of select="Quick_Report/Total_Students"/></td>
<td><xsl:value-of select="Quick_Report/Last_Week_Attend"/></td>
</tr>
<tr>
<th>Last Months Attendance</th>
<td>#<xsl:value-of select="Quick_Report/Total_Students"/></td>
<td><xsl:value-of select="Quick_Report/Last_Month_Attend"/></td>
</tr>
</table>
</body>
</html>


Any help would be really great.

Thank you!
Sponsor
Sponsor
Sponsor
sponsor
StarGateSG-1




PostPosted: Wed Apr 26, 2006 8:04 am   Post subject: (No subject)

Hello,

Can anyone help me? I don't mean to be rude, but I have a deadline in 2 months and I need to get this program working, I spent lots of time on it and It doesn't amke sense, no other forum has been able you are my last hope CompSci, don;t let me down.

Thank you
rdrake




PostPosted: Wed Apr 26, 2006 10:38 am   Post subject: (No subject)

Typo in the first one
code:
<Last_Week_Attend>100</Last_Week_Atend>


Sorry, I've been buried in a mountain of config files.
StarGateSG-1




PostPosted: Thu Apr 27, 2006 8:16 am   Post subject: (No subject)

Wow,

Lol, I never noticed that. I guess it takes a clearer head sometimes.

Thanks

Edit: Hmm... that did not fix the problem.
Corvillus




PostPosted: Thu May 11, 2006 10:28 pm   Post subject: (No subject)

It's exactly as the error said, you forgot to close all the xsl tags. Since XSLT scripts are XML documents, they must be well formed (all tags must be closed, all attributes must be defined, among other things) in order to work. Adding
code:

</xsl:template>
</xsl:stylesheet>

to the end should fix it.
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: