RE: [xsl] Can one Use JavaScript to update XSL:Variables

Subject: RE: [xsl] Can one Use JavaScript to update XSL:Variables
From: dave frette <gohabitat@xxxxxxxxx>
Date: Thu, 29 Jul 2004 10:26:24 -0700 (PDT)
Great example.  Thanks Pieter!

But, say I want to perform a browser check via js.
I would probably create an init_ie(), transform_ie(), init_ns(), and transform_ns(). 

Basically this code looks really simple and perhaps netscape has
some similar objects to use??

Any suggestions?

    <script language="javascript">
      var ss, cache;

      function init()
        // create and load XSLT stylesheet  must be free-threaded
        ss = new ActiveXObject('MSXML2.FreeThreadedDOMDocument.4.0');
        ss.async = false;

        // create XSLTemplate object and compile stylesheet into it
        cache = new ActiveXObject("Msxml2.XSLTemplate.4.0");
        cache.stylesheet = ss;

      function transform(source)
        // create and load source document
        var src = new ActiveXObject('MSXML2.DOMDocument.4.0');
        src.async = false;

        // retrieve cached XSLProcessor and transform the source document
        var proc = cache.createProcessor();
        proc.input = src;
        target.innerHTML = proc.output;

--- Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx> wrote:

> OK Dave, then
> should help you getting it to work.
> If you need additional info let us know.
> Cheers,
> <prs/>

Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone. 

Current Thread