[xsl] javascript, frames and XSL oddity

Subject: [xsl] javascript, frames and XSL oddity
From: Shane <that1guy@xxxxxxxxxxxx>
Date: Mon, 26 Feb 2001 14:39:51 -0800 (PST)

I'm new to the XSL world and am stumped by this issue. I could really
use some help with this one.

I have a frameset containing some task-related content in one frame and a
"Main" display area. I'm having trouble including a javascript document
from my XSL Stylesheet.

Here's the process flow: A JSP file includes the proper processors (sax &
xalan) and passes the name of the XML and XSL file to the processor with
the target of the link that calls the JSP being the "Main" display frame.

When I insert the standard code I was using to load a .js file from within
the head of the standard HTML file (see code), the XSL transformation
removes the ending script tag, closes the opening javascript tag and
parses the page. This seemed reasonable to me.

Here's the stumper...

When the results are returned to the browser, the display is seemingly
blank. I view the source from the browser and discover that the source is
the source for the outer frameset document, not the content page that
should have been produced. I don't know if this frameset file is truly
being loaded or if it's just showing me that because no real results were
returned from the XML/XSL parsing process. I suspect the latter.

If I click the link that calls the jsp page a second time, the correct
-content- is displayed but the CSS stylesheet and misc. functions that
should have been loaded by the javascript file have not been applied to
the results (No CSS formatting applied to the page and JS functions

If I remove the javascript include from the XSL stylesheet, everything
works as expected. The page results are returned to the correct frame and
all content is in place.

Any ideas?

The Stylesheet: I have tried including the javascript file with the
standard code shown and also with the xsl:element method, both with the
same results.
The JS file: The included file is a series of document.write declarations
that include a few other javascripts that make functions and such
The Code:

<?xml version="1.0"?>
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" indent="yes" encoding="iso-8859-1"/>

<xsl:template match="/">

	<title>framed document</title>
language="JavaScript" type="text/javascript" src="/path_to_script/loadscripts.js"></script>
<!-- this what it looks like after parsing <script
language="JavaScript" type="text/javascript" src="/path_to_script/loadscripts.js"/>
<!-- tried this as well with the same results
	<xsl:element name="script">
		<xsl:attribute name="language">JavaScript</xsl:attribute>
		<xsl:attribute name="type">text/javascript</xsl:attribute>

<!-- SNIP: just standard HTML with a couple of xsl:value-of insertions -->


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread