Hello everyone,
I was wondering if somebody could help me out.
We want to include our XML file in the same file that that has the XSL. It works perfectly in Firefox (2) but IE 6 or 7 cannot find the XML when it tries to parse it with the XSL code, but at the end it just dumps it on the screen as text. What I mean is the way it should look with XSL is not displayed, but the raw XML is. In firefox it works flawlessly.
Anyone could help to give me some pointers how to accomplish this (but no remarks why I shouldn't please).
Here is my XML and XSL file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet version="2.0" type="text/xsl" href="#stylesheet"?>
<!DOCTYPE d3 [
<!ATTLIST xsl:stylesheet id ID #REQUIRED>
]>
<d3>
<xsl:stylesheet id="stylesheet" version="2.0" xmlns:xsl="<xslutput method="html" encoding="ISO-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="<xsl:template match="ROOT">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>PUC Courses</title>
<link rel="stylesheet" href=" type="text/css" media="print" />
<style type="text/css">
table.sortable a.sortheader {
background-color:#3A6EA5;
color:#ffffff;
text-decoration: none;
display: block;
}
table.sortable span.sortarrow {
color: black;
text-decoration: none;
}
th {
background-color: #3A6EA5;
color: #ffffff;
text-align: left;
vertical-align: text-top;
padding: 4px;
font-family: "Trebuchet MS", Verdana, sans-serif;
font-size: 11px;
border-color: #3A6EA5;
border-width: 0px;
border-style: solid;
}
td {
background-color: #EEF0EB;
color: #000000;
text-align: left;
vertical-align: text-top;
padding: 4px;
font-family: "Trebuchet MS", Verdana, sans-serif;
font-size: 10px;
border-color: #989898;
border-width: 0px;
border-style: dashed;
}
td.menuon { background-color: #787878; color: #ffffff; border-style: solid;}
td.menuoff {
background-color: #EEF0EB;
color: #000000;
text-align: left;
vertical-align: text-top;
padding: 4px;
font-family: "Trebuchet MS", Verdana, sans-serif;
font-size: 10px;
border-color: #989898;
border-width: 0px;
border-style: dashed;
}
body {
font-family: verdana,sans-serif;
font-size: .8em;
background-color: #ffffff;
margin: 0;
}
</style>
<script language="javascript" src="sorttable.js"></script>
</head>
<body>
<table class="sortable" id="2007">
<tr>
<th>Course Type</th>
<th>CODE</th>
<th>DEPT</th>
<th>SUBJT</th>
<th>SPR</th>
<th>Section</th>
<th>Term</th>
<th>Short Title</th>
<th>CREDIT</th>
<th>Faculty Names</th>
<th>Seats Available</th>
<th>Capacity</th>
<th>BLDG</th>
<th>ROOM</th>
<th>BEGIN</th>
<th>DAYS</th>
</tr>
<xsl:for-each select="COURSE.SECTIONS">
<tr>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="AAA" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="BBB" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="CCC" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="DDD" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="EEE" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="FFF" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="GGG" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="HHH" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="III" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="JJJ" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="KKK" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="LLL" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="MMM" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="NNN" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="OOO" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="PPP" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="xsl:stylesheet" />
</xsl:stylesheet>
<ROOT>
<COURSE.SECTIONS>
<AAA>GE1A</AAA>
<BBB>1542</BBB>
<CCC>CA</CCC>
<DDD>BLAH</DDD>
<EEE>1</EEE>
<FFF>02</FFF>
<GGG>BLAH</GGG>
<HHH>2.0</HHH>
<III>Sampres</III>
<JJJ>1</JJJ>
<KKK>25</KKK>
<LLL>PBS</LLL>
<MMM>AF</MMM>
<NNN>5-7</NNN>
<OOO>0AAA</OOO>
<PPP>0AAA</PPP>
</COURSE.SECTIONS>
</ROOT>
</d3>
Thank you
I was wondering if somebody could help me out.
We want to include our XML file in the same file that that has the XSL. It works perfectly in Firefox (2) but IE 6 or 7 cannot find the XML when it tries to parse it with the XSL code, but at the end it just dumps it on the screen as text. What I mean is the way it should look with XSL is not displayed, but the raw XML is. In firefox it works flawlessly.
Anyone could help to give me some pointers how to accomplish this (but no remarks why I shouldn't please).
Here is my XML and XSL file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet version="2.0" type="text/xsl" href="#stylesheet"?>
<!DOCTYPE d3 [
<!ATTLIST xsl:stylesheet id ID #REQUIRED>
]>
<d3>
<xsl:stylesheet id="stylesheet" version="2.0" xmlns:xsl="<xslutput method="html" encoding="ISO-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="<xsl:template match="ROOT">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>PUC Courses</title>
<link rel="stylesheet" href=" type="text/css" media="print" />
<style type="text/css">
table.sortable a.sortheader {
background-color:#3A6EA5;
color:#ffffff;
text-decoration: none;
display: block;
}
table.sortable span.sortarrow {
color: black;
text-decoration: none;
}
th {
background-color: #3A6EA5;
color: #ffffff;
text-align: left;
vertical-align: text-top;
padding: 4px;
font-family: "Trebuchet MS", Verdana, sans-serif;
font-size: 11px;
border-color: #3A6EA5;
border-width: 0px;
border-style: solid;
}
td {
background-color: #EEF0EB;
color: #000000;
text-align: left;
vertical-align: text-top;
padding: 4px;
font-family: "Trebuchet MS", Verdana, sans-serif;
font-size: 10px;
border-color: #989898;
border-width: 0px;
border-style: dashed;
}
td.menuon { background-color: #787878; color: #ffffff; border-style: solid;}
td.menuoff {
background-color: #EEF0EB;
color: #000000;
text-align: left;
vertical-align: text-top;
padding: 4px;
font-family: "Trebuchet MS", Verdana, sans-serif;
font-size: 10px;
border-color: #989898;
border-width: 0px;
border-style: dashed;
}
body {
font-family: verdana,sans-serif;
font-size: .8em;
background-color: #ffffff;
margin: 0;
}
</style>
<script language="javascript" src="sorttable.js"></script>
</head>
<body>
<table class="sortable" id="2007">
<tr>
<th>Course Type</th>
<th>CODE</th>
<th>DEPT</th>
<th>SUBJT</th>
<th>SPR</th>
<th>Section</th>
<th>Term</th>
<th>Short Title</th>
<th>CREDIT</th>
<th>Faculty Names</th>
<th>Seats Available</th>
<th>Capacity</th>
<th>BLDG</th>
<th>ROOM</th>
<th>BEGIN</th>
<th>DAYS</th>
</tr>
<xsl:for-each select="COURSE.SECTIONS">
<tr>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="AAA" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="BBB" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="CCC" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="DDD" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="EEE" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="FFF" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="GGG" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="HHH" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="III" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="JJJ" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="KKK" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="LLL" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="MMM" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="NNN" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="OOO" />
</td>
<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
<xsl:value-of select="PPP" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="xsl:stylesheet" />
</xsl:stylesheet>
<ROOT>
<COURSE.SECTIONS>
<AAA>GE1A</AAA>
<BBB>1542</BBB>
<CCC>CA</CCC>
<DDD>BLAH</DDD>
<EEE>1</EEE>
<FFF>02</FFF>
<GGG>BLAH</GGG>
<HHH>2.0</HHH>
<III>Sampres</III>
<JJJ>1</JJJ>
<KKK>25</KKK>
<LLL>PBS</LLL>
<MMM>AF</MMM>
<NNN>5-7</NNN>
<OOO>0AAA</OOO>
<PPP>0AAA</PPP>
</COURSE.SECTIONS>
</ROOT>
</d3>
Thank you