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
Thank you!
Best regards,
Oleg Chernavin
MP Staff
"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))
"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))
I would like to help more, but I don`t have access to your server to see what is wrong myself.
Oleg.
> 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
What if I don`t have a XML file, the XML string is created dynamically in the ASP page.
Oleg.
> 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"?>