Netscape 7, xsl, js problem

P

Pavel

Greetings to all -

I've noticed that my xsl transformation does not work in Netscape 7.
It worked fine in Netscape 6.1, or if html file is generated using
xalan (and it works in IE 5, not that it's important :)

If I load my xml file in Netscape 7 it goes into the load loop and
never comes out of it. I've been able to localize the problem. It's
related to the document.write() JS call inside the template. If I
would comment out the JS call then everything works fine.

Here is the stylesheet file called test.xsl with relevant code in it:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:eek:utput method="html" indent="yes" />

<xsl:template match="/">
<html>
<head>
<title>Test</title>
</head>
<body>

<script language="JavaScript">
document.write(document.lastModified);
</script>

</body>
</html>
</xsl:template>

</xsl:stylesheet>

Any xml file will do but here is the one that I've used:
--cut--
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>

<test>
</test>
--cut--

Any idea why it does not work with this JS call in Netscape 7 ?
Thanks
Pavel
 
M

Martin Honnen

Pavel wrote:

If I load my xml file in Netscape 7 it goes into the load loop and
never comes out of it. I've been able to localize the problem. It's
related to the document.write() JS call inside the template. If I
would comment out the JS call then everything works fine.

Netscape doesn't support the use of document.write in the result
document of an XSLT transformation, see issue 4. in the faq
http://www.mozilla.org/projects/xslt/faq.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top