Problems with XML-XSL pages

Monica
06/14/2004 11:08 am
Hi,
I`m trying to download a internal application of my company and I`ve found some problems with the xsl pages.

The system works as follow: a servlet sends the data (xml data) to the client, which is parsed by an specific xsl file.
I`ve downloaded the application, and when I click the links that involved an xsl files, this error appears:

"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.
--------------------------------------------------------------------------------
The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document. "

Also, the page has a frame to load an applet, but with OE I don`t know how to make the applet works.

Maybe you can help me a little bit... Thanks
Oleg Chernavin
06/14/2004 11:11 am
Perhaps Offline Explorer tries to change some links in the XSL file, so it can work offline. Anyway, is it possible to visit the Web site to reproduce the problem?

Thank you!

Best regards,
Oleg Chernavin
MP Staff
Manoj
06/22/2004 06:00 am
Iam getting the following error.
"The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document"

Iam wriiting this code in body part in javascript. what I want is, to load one xml and one xsl file and display xml in xsl using javascript. Below is the code:

var xml =new ActiveXObject("Microsoft.XMLDOM")
xml.async=false
xml.load("test.xml")

var xsl =new ActiveXObject("Microsoft.XMLDOM")
xsl.async=false
xsl.load("test.xsl")
document.write(xml.transformNode(xsl))
Manoj
06/22/2004 06:00 am
Iam getting the following error.
"The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document"

Iam wriiting this code in body part in javascript. what I want is, to load one xml and one xsl file and display xml in xsl using javascript. Below is the code:

var xml =new ActiveXObject("Microsoft.XMLDOM")
xml.async=false
xml.load("test.xml")

var xsl =new ActiveXObject("Microsoft.XMLDOM")
xsl.async=false
xsl.load("test.xsl")
document.write(xml.transformNode(xsl))
Oleg Chernavin
06/22/2004 07:04 am
Well, I am not an expert in XML. Can you check, if Offline Explorer loaded the .xsl file? Also, compare both files contents - maybe Offline Explorer changed something there internally?

I would like to help more, but I don`t have access to your server to see what is wrong myself.

Oleg.
Ram Mukunda
11/17/2004 03:57 am
> Hi,
> I`m trying to download a internal application of my company and I`ve found some problems with the xsl pages.
>
> The system works as follow: a servlet sends the data (xml data) to the client, which is parsed by an specific xsl file.
> I`ve downloaded the application, and when I click the links that involved an xsl files, this error appears:
>
> "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.
> --------------------------------------------------------------------------------
> The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document. "
>
> Also, the page has a frame to load an applet, but with OE I don`t know how to make the applet works.
>
> Maybe you can help me a little bit... Thanks

Hello:

I had the same problem till I figured out the right elements to use in the XSL. Maybe
you have the same problem.

Make sure you have the following EXACT two lines at the top of the XSL file
<?xml version=`1.0`?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

and
</xsl:stylesheet>

as the last line.

Hope this helps

- Ram

RobertoS
03/10/2005 03:49 pm
it has to do with the path information. it is not looking in the right folder. try server.mappath("your file.xml")
debarupa
04/18/2005 03:49 pm
> it has to do with the path information. it is not looking in the right folder. try server.mappath("your file.xml")

What if I don`t have a XML file, the XML string is created dynamically in the ASP page.
Oleg Chernavin
04/19/2005 06:23 am
Is it possible to look at the actual site with this problem?

Oleg.
Natalie
02/09/2006 04:27 am
> Hi,
> I`m trying to download a internal application of my company and I`ve found some problems with the xsl pages.
>
> The system works as follow: a servlet sends the data (xml data) to the client, which is parsed by an specific xsl file.
> I`ve downloaded the application, and when I click the links that involved an xsl files, this error appears:
>
> "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.
> --------------------------------------------------------------------------------
> The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document. "
>
> Also, the page has a frame to load an applet, but with OE I don`t know how to make the applet works.
>
> Maybe you can help me a little bit... Thanks


Try to add at the beginning of xsl file

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