Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] IE Problem (variable passing ?)

From: Abel Braaksma <abel.online@--------->
To:
Date: 1/5/2007 4:48:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent