Jeremy Patterson wrote:
I'm having a problem with Internet Explorer, the page isn't being processed.
When I use firefox it works fine.
I'm using mozilla's sarissa javascript, to do a client side transformation.
Sarissa is not a Mozilla script. It is open source and generic to work
on Mozilla, Firefox, IE5.5, IE6, Opera etc.
The reason I'm using sarissa is that I have to pass a variable to the xslt.
You can do so without Sarissa as well. The reason to choose Sarissa
should be: a unified interface for client side XSLT transformations. For
instance, the parameter passing is different between IE and FF (notably,
the argument for the namespace is on the end and beginning of the
argument list respectively)
The page will appear two different ways depending on the value that is
passed.
Sounds like a good design to me.
Here's how I declared the variable, it's global:
<xsl:param name="strName" select="'None'"/>
Nothing wrong there. On the global thingy: only global parameters can be
set from outside.
Here's my head in my xslt, where the sarissa script is declared. I'm guessing
the reason there is nothing appearing because IE is not detecting the sarissa
script, hence it's not reading the variable.
<head>
<link rel="stylesheet" href="sctStyleSheet.css" type = "text/css"/>
<script type="text/javascript" src="sarissa.js"></script>
</head>
This is HTML, not XSLT. There is nothing wrong with the above
declaration. It works both on IE and FF. The closing tag is necessary
(using "/>" would cause the browser to choke on it, but you do that
correctly).
Ok, on the more general note: if you use Sarissa, you likely have some
javascript that creates an XSLT processor and assign parameters to it
using setParameter(). If there's an error, it is in there. I use Sarissa
and I make abundant use of parameters, and I know that it works on both
IE and FF.
To test if the problem is in the XSLT or in Sarissa or in your own
Javascript, take one of the samples from the site of Sarissa and make a
tiny standalone project with as little lines as possible. Also, make the
XSLT as small as possible. Then, make sure you catch the result XML tree
from the XSLT process and view it's raw contents (not the result that
you insert into your browser's DOM tree, because the rendering of the
browsers may also have set you off).
Not sure if this helps you, but if not, please add a mini-project that
fails to work for you and make sure to include your lines of XSLT and
JavaScript code.
Cheers,
-- Abel Braaksma
http://www.nuntia.nl