Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help displaying XML

Status
Not open for further replies.

Floodster

Technical User
Jan 28, 2005
204
I keep getting this error when trying to view my page on a live server (it works fine on my test machine)

Code:
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

A name was started with an invalid character. Error processing resource '[URL unfurl="true"]http://www.mbgolfsociety.co.uk/navigation/home.asp...[/URL]

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

i'm pulling my hair out
 
post xml and xsl

Jon

"I don't regret this, but I both rue and lament it.
 
Ok, I think this is what you are after;
Code:
XML
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<!--#include file="../includes/includes.asp" -->
<!-- TemplateBeginEditable name="doctitle" -->
<title>M&amp;B Golf Society</title>
<!-- TemplateEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link href="../css/menu.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../css/niftyPrint.css" media="print" />
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then  
  MM_logoutRedirectPage = "../navigation/home.asp"
  ' redirect with URL parameters (remove the "MM_Logoutnow" query param).
  if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
  If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    MM_newQS = "?"
    For Each Item In Request.QueryString
      If (Item <> "MM_Logoutnow") Then
        If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
        MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
      End If
    Next
    if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
  End If
  Session.Contents.Remove("sess_User_Logname")
  Response.Redirect(MM_logoutRedirectPage)

		
End If

%>
<script type="text/javascript" src="../includes/nifty.js"></script>
<script type="text/javascript" src="../includes/layout.js"></script>
<script type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body bgcolor="#FFFFFF">
<div id="main_nifty"> 
  <div id="menu"> 
    <table border="0" cellspacing="5" cellpadding="0">
      <%
		if Session("sess_User_logname")<>"" then
		response.write("<tr><td><div align=""left""><h5>" & Session("sess_User_logname") &"<br /><a href=""" & MM_Logout & """>Log Out</a></h5></div></td></tr>")
		End If
		%>
      <tr> 
        <td><div align="center"><img src="../images/mblogo_golfball.jpg" alt="M&amp;B Logo" name="mblogo" width="145" height="120" id="mblogo" /></div></td>
      </tr>
      <tr> 
        <td><a href="../navigation/home.asp" target="_self" onmouseover="MM_swapImage('home_off','','../images/buttons/home_on.jpg',1)" 	onmouseout="MM_swapImgRestore()"><img src="../images/buttons/home_off.jpg" alt="Home" name="home_off" width="145" height="35" border="0" 		id="home_off" /></a></td>
      </tr>
      <tr> 
        <td><a href="../navigation/fixtures.asp" target="_self" onmouseover="MM_swapImage('fixtures_off','','../images/buttons/fixtures_on.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="../images/buttons/fixtures_off.jpg" alt="Fixtures" name="fixtures_off" width="145" height="35" border="0" id="fixtures_off" /></a></td>
      </tr>
      <tr> 
        <td><a href="results.asp" target="_self" onmouseover="MM_swapImage('results_off','','../images/buttons/results_on.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="../images/buttons/results_off.jpg" alt="Results" name="results_off" width="145" height="35" border="0" id="results_off" /></a></td>
      </tr>
	   <tr> 
        <td><a href="winners.asp" target="_self" onmouseover="MM_swapImage('winners_off','','../images/buttons/winners_on.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="../images/buttons/winners_off.jpg" alt="Winners" name="winners_off" width="145" height="35" border="0" id="winners_off" /></a></td>
      </tr>
      <tr> 
        <td><a href="handicaps.asp" target="_self" onmouseover="MM_swapImage('handicaps_off','','../images/buttons/handicaps_on.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="../images/buttons/handicaps_off.jpg" alt="Handicaps" name="handicaps_off" width="145" height="35" border="0" id="handicaps_off" /></a></td>
      </tr>
      <tr> 
        <td><a href="members.asp" target="_self" onmouseover="MM_swapImage('membership_off','','../images/buttons/membership_on.jpg',1)" 	onmouseout="MM_swapImgRestore()"><img src="../images/buttons/membership_off.jpg" alt="Membership Details" name="membership_off" width="145" height="35" border="0" id="membership_off" /></a></td>
      </tr>
      <tr> 
        <td><a href="contact.asp" target="_self" onmouseover="MM_swapImage('contact_off','','../images/buttons/contact_on.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="../images/buttons/contact_off.jpg" alt="Contact Us" name="contact_off" width="145" height="35" border="0" id="contact_off" /></a></td>
      </tr>
      <tr><td><div align="center"><a href="[URL unfurl="true"]http://validator.w3.org/check?uri=referer"><img[/URL] class="imgw3c" 
        src="[URL unfurl="true"]http://www.w3.org/Icons/valid-xhtml10"[/URL]
        alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a></div></td>
		</tr>
      </table>
  </div>
  <div id="container"> <!-- TemplateBeginEditable name="main_layer" --> this is 
    where you can edit <!-- TemplateEndEditable --> </div>
  <div id="bottom"> 
    <p class="privacy"><a class="secret" href="../navigation/login.asp">Design 
      by John Flood</a> | <a href="[URL unfurl="true"]http://www.w3.org/">Built[/URL] to W3C Standards</a> 
      | <a href="../navigation/accessibility.asp">Accessibility</a></p>
  </div>
</div>
</body>
</html>
& i think this is the XSL
Code:
form {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #336699;
	padding-right: 5px;
	padding-left: 5px;
}
p {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #000000;
	padding-right: 5px;
	padding-left: 5px;
	padding-top: 0px;
	padding-bottom: 0px;
	list-style-type: none;
}
h2 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 22px;
	font-weight: bold;
	color: #336699;
	text-align: center;
	text-decoration: underline;
}
h5 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	color: #336699;
	padding-right: 5px;
	padding-left: 5px;
}
a.secret:link {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #336699;
	font-weight: normal;
	text-decoration: none;
}
a.secret:visited {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #336699;
	font-weight: normal;
	text-decoration: none;
}
a.secret:hover {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #336699;
	font-weight: normal;
	text-decoration: none;
}
a:link {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #990033;
	font-weight: normal;
}
a:visited {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #336699;
}
a:hover {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #990033;
	text-decoration: underline;
	font-weight: normal;
}

table {
	padding-right: 5px;
	padding-left: 5px;
	margin: 5px;
	padding-top: 0px;
	padding-bottom: 0px;
	border: thin none #009900;
}
.imgw3c{
	border: none;
}





}
h4 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-weight: bold;
	color: #336699;
	padding-right: 1px;
	padding-left: 5px;
}
.small {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #990033;
	padding-right: 5px;
	padding-left: 5px;

}
h3 {
	font-family: Arial, Helvetica, sans-serif;
	color: #FF0000;
	font-size: 14px;
	padding-right: 5px;
	padding-left: 5px;



}
select {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #336699;
}
h1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 36px;
	font-weight: bold;
	color: #FF0000;
	padding-right: 5px;
	padding-left: 5px;
}
/* Nifty Corners */
.rtop,.artop{display:block}
.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px}
.artop *{border-style: solid;border-width:0 1px}
.r1,.rl1,.re1,.rel1{margin-left:5px}
.r1,.rr1,.re1,.rer1{margin-right:5px}
.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px}
.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px}
.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px}
.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px}
.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px}
.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px}
.rx1,.rxl1{border-left-width:5px}
.rx1,.rxr1{border-right-width:5px}
.rx2,.rxl2{border-left-width:3px}
.rx2,.rxr2{border-right-width:3px}
.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px}
.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px}
.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0}
.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0}
.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px}
.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px}

.table2 {
	background-color: #FFFFFF;
	border: thin solid;
	vertical-align: middle;
	background-position: center;


}
div#main_nifty {
	position: relative;
	background-color: #A0D6A4;
	width: 900px;
	height: auto;
	margin: 40px;
}
div#menu{
	position: relative;
	margin: 0;
	background:#A0D6A4;
	float: left;
	overflow: auto;
	height: auto;
}
div#container{
	position: relative;
	background:#A0D6A4;
	float: left;
	width: 650px;
	height: auto;
	margin: -400px 0px 0px 105px;
	overflow: auto;
}
div#bottom{
	position: relative;
	background:#A0D6A4;
	margin: 20px 20px 20px 20px;
	color: #A0D6A4;
}
p.privacy{
	background-color: #A0D6A4;
}
caption {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #FF0000;
}

any help would be great.
I have tried one of the pages on an existing site that runs .ASP no problem & I got this error

Code:
You are not authorized to view this page
The URL you attempted to reach has an ISAPI or CGI application installed that verifies user credentials before proceeding. This application cannot verify your credentials.
 
OK, I've had a reply from another forum & basically my pages does not contain any XML but Dreamweaver included the line
Code:
<?xml version="1.0" encoding="iso-8859-1"?>

which I think is causing the error, I've been informed that if I remove this line it should resolve it.

Can anyone confirm this??
 
>You are not authorized to view this page
>The URL you attempted to reach has an ISAPI or CGI application installed that verifies user credentials before proceeding. This application cannot verify your credentials.


You have now this error on an asp enabled server. Your page check session("sess_User_logname") etc etc. That's the message you've got. Not the first post. Your first post seems to say <% as invalid. Furthermore, your xslt seems to be css rather. You seem to succeed in making some confusing messages to the forum(s)? I don't know.
 
tsuji,
I am getting 2 errors from 2 different servers the first error is on a new server which;
Code:
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

A name was started with an invalid character. Error processing resource '[URL unfurl="true"]http://www.mbgolfsociety.co.uk/navigation/home.asp...[/URL]

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
which I'm hoping will be resolved if I remove the line;
Code:
<?xml version="1.0" encoding="iso-8859-1"?>

The other error was on a completely different server which already has one of my sites hosted, which runs .ASP & that error was;
Code:
You are not authorized to view this page
The URL you attempted to reach has an ISAPI or CGI application installed that verifies user credentials before proceeding. This application cannot verify your credentials.

I hope that makes it clear for you??
 
If you put:

<?xml version="1.0" encoding="iso-8859-1"?>

at the beginning, the browser will interpret it as XML. IE has a default XSL stylesheet it uses to display XML in the browser window (thats why XML displays differently to HTML). IE doesn't strictly support XHTML as such. If you remove the line, IE will interpret it as HTML and you'll be fine.

The ASP problem should be discussed in the ASP forum.

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top