Hey all i am trying to make an XML file but I'm getting an error. The error is 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.
A name contained an invalid character. Error processing resource 'https://localhost/dell/pcxsl.xsl'. Line 60, Position 8
<div id"fixedwidth">-------^I am using internet explore 6.0

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v2007 ([url]http://www.altova.com[/url] ) -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' encoding='UTF-8' />
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function Form(fldLogin, fldPassword) {
// check for empty field
if (fldLogin.value == "") {
  alert("You Must Enter Your User Name");
  fldLogin.focus();
  return false;
}
// check for empty field
else if (fldPassword.value == "") {
  alert("You Must Enter Your Password");
  fldPassword.focus();
  return false;
}
else {
  return true; // validation ok
}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<link href="css.css" rel="stylesheet" type="text/css">
<body onload="MM_preloadImages('images/sponsors/ati_logo.jpg','images/sponsors/nvidia_logo.gif','images/sponsors/dell.gif')">
<div id"fixedwidth">
<div id="banner"></div>
<div id="guestInfo">
<div id="welcomebox">
  <p>Welcome Guest </p>
  <p align="center"> The Time Is: <?php print date("H.i A"); ?></p>
  <p align="center">Today Date Is: <?php echo date("d/m/y"); ?></p>
  </div>
 <form action="" id="loginForm" method="get" name"customer_login" onsubmit="return Form(this.name_fld, this.password_fld);"> 
  <fieldset>
 <legend>Log in</legend>
   <div class="row">
  <label for="name_fld">User name: </label>
  <input class="field" name="name_fld" type="text" id="name_fld" size="25" />
</div>
   <div class="row">
  <label for="password_fld">Password: </label>
  <input class="field"  name="password_fld" type="text" id="password_fld" size="25" />
</div> 
     <div align="center">  <input name="cmdLogin" type="submit" id="cmdLogin" value="Login"/> </div>
  <div align="center" class="forgotpassword">Forgotten password </div>
</fieldset>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div id="menu">
<p><u>Menu</u></p>
<table width="100%" border="1" cellspacing="0" cellpadding="0" class="mainContent">
  <tr>
    <td class="menulist"><a href="index.php">Home</a></td>
  </tr>
  <tr>
    <td>Register Account </td>
  </tr>
  <tr>    </tr>
  <tr>
    <td><a href="pcSortwith_xsl.xml">PC Computer Products</a> </td>
  </tr>
  <tr>
    <td>Network Products </td>
  </tr>
  <tr>
    <td>Links</td>
  </tr>
  <tr>
    <td>Contact</td>
  </tr>
</table>
  <p>&nbsp;</p>
 <p>&nbsp;</p>
   <p>&nbsp;</p>
  <p>&nbsp;</p>
    <p>&nbsp;</p>
   <p>&nbsp;</p>
     <p>&nbsp;</p>
    <p>&nbsp;</p>
      <p>&nbsp;</p>
 
 
</div>
<div id="sponsors">
<p><strong><u>Sponsors</u></strong></p>
<p><a href="www.dell.co.uk" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Sponsor 3','','images/sponsors/dell.gif',1)"><img src="images/sponsors/dellbl.gif" alt="Dell" name="Sponsor 3" width="150" height="159" border="0" id="Sponsor 3" /></a></p>
<p><a href="www.nvidia.co.uk" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Sponsor 2','','images/sponsors/nvidia_logo.gif',1)"><img src="images/sponsors/nvidiabw_logo.gif" alt="Nvidia" name="Sponsor 2" width="150" height="159" border="0" id="Sponsor 2" /></a></p>
<p><a href="http://ati.amd.com/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('sponsor','','images/sponsors/ati_logo.jpg',1)"><img src="images/sponsors/ati_logobw.jpg" alt="ATI" name="sponsor" width="150" height="159" border="0" id="sponsor" /></a> </p>
</div>
<div id="mainContent">
<table>
    <tr>
      <th align="left">Pc Name</th>
      <th align="left">Stock</th>
<th align="left"> Cost</th>
    </tr>
    <xsl:for-each select="pclist/pc">
 <xsl:sort select="pc_name" data-type="number"/>
    <tr>
   <td><xsl:value-of select="pc_name"/></td>
      <td><xsl:value-of select="pc_stock"/></td>
 <td><xsl:value-of select="cost"/></td>
    </tr>
    </xsl:for-each>
  </table>
</div>
<div id="copyright">
<p>Copyright</p>
<p>&copy; Dell-IOM &copy;</p>
<p>2007 - 2009 </p>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

The XML Code (If You Need To See That)

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v2007 ([URL]http://www.altova.com[/url] ) -->
<?xml-stylesheet type="text/xsl" href="pcxsl.xsl"?>
<pclist>
 <pc>
  <pc_name>dell</pc_name>
  <pc_stock>5</pc_stock>
  <cost>£8000</cost>
 </pc>
 <pc>
  <pc_name>dell 1</pc_name>
  <pc_stock>50</pc_stock>
  <cost>£300</cost>
 </pc>
  <pc>
  <pc_name>dell 2</pc_name>
  <pc_stock>1</pc_stock>
  <cost>£500</cost>
 </pc>
  <pc>
  <pc_name>dell 3</pc_name>
  <pc_stock>5</pc_stock>
  <cost>£800</cost>
 </pc>
</pclist>

Also, how do you sort so you can put the lowest cost at the top of the page i trying using sort numbers but that did nothing.

Thanks 4 any help.

Anyone know?, if i take away the css and just keep it in a basic table it works so i guessing its cuz of that?

hi
i want to readmy message history but i can't
each time i try , this message appears to me the xml page cannot displayed
cannot view xml input using xsl style sheet.please correct the error and then click the refresh button,or try again later

You're sure you want to use Internet Explorer? (This MS software can have problems opening XML files). Use Notepad or an another text viewer, if you can.

This article has been dead for over six months. Start a new discussion instead.