This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes cant view xml using xsl. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "cant view xml using xsl." Watch "cant view xml using xsl." New topic
Author

cant view xml using xsl.

Hari priya
Ranch Hand

Joined: Mar 11, 2004
Posts: 134
Hi -

I have an xml file and an xsl file. I am able to view the local copies on my computer. But when I transfer them to my web site, I get an error shown below. I am using IE 6. Can some one tell me why this problem occurrs? Thanks!


[ September 02, 2004: Message edited by: Hari priya ]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What does the faulty line contain?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Hari priya
Ranch Hand

Joined: Mar 11, 2004
Posts: 134
Hi Lasse -

I have pasted the error below. It says in Line 1 and character 420 but line 1 in the xml file does not have as many characters.

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. Line 1, Position 420


<html><head><title>Apache Tomcat/4.0.3 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>Apache Tomcat/4.0.3 - HTTP Status 404 - /ApproachPlates.xml</h1><HR size="1" noshade><p><b>type</b> Status report</p><p><b>message</b> <u>/ApproachPlates.xml</u></p><p><b>description</b> <u>The requested resource (/ApproachPlates.xml) is not available.</u></p><HR size="1" noshade></body></html>
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Are you sure all the xml files were at correct location in your xml file.
If so , if the xml and xsl code is very small then can you post it here using UBB code tags ?


Spritle Software Blogs
Hari priya
Ranch Hand

Joined: Mar 11, 2004
Posts: 134
Hi Balaji -

The xml file that I am using is too huge to post it here. And I am sure that xml file is well formatted also the xsl file.
I have pasted the initial lines below. Let me know if I have to post anything else.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Mystyle.xsl"?>

This is the namespace I use in the xsl file-

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Ok send me an email of ur xml and xsl file. i will upload it here(on some free webservers like geocities) and see.
Hari priya
Ranch Hand

Joined: Mar 11, 2004
Posts: 134
It works now. Thanks Balaji for your replies.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cant view xml using xsl.
 
Similar Threads
Need Help with XSLT
Need help regarding <p>
text in XML tag
xml / xsl not accessible on netscape & mozilla
Mozilla help for xslt