•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 423,608 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,244 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 1768 | Replies: 1
![]() |
•
•
Join Date: Mar 2007
Posts: 12
Reputation:
Rep Power: 2
Solved Threads: 0
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
The XML Code (If You Need To See That)
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.
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 (http://www.altova.com) -->
<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> </p>
<p> </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> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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>© Dell-IOM ©</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 (http://www.altova.com) -->
<?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.
Last edited by teh_man : Apr 30th, 2007 at 9:07 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb XML, XSLT and XPATH Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
acrobat adobe algos api asp bebo blogger blogging bug code development dom drama feed fortitude gdata google hope html katemodern linspire linux lonelygirl15 microsoft news openoffice pdf programming reader rss soap standards struggle trial-and-error tv victory video w3c weather web xml xoap youtube
- XML syntax error "){" (RSS, Web Services and SOAP)
- ASP page showing up as XML...? (ASP.NET)
- Noob : Input Stream Trouble (Java)
- Parse XML from ASP!!! (ASP)
- Reading stream with two xml files in (Java)
- Help ME (Windows NT / 2000 / XP / 2003)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: XForms Select1 itemset model instance
- Next Thread: XSLT - inserting new elements


Linear Mode