[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can one Use JavaScript to update XSL:Variables

Subject: RE: Can one Use JavaScript to update XSL:Variables
From: dave frette <gohabitat@xxxxxxxxx>
Date: Thu, 29 Jul 2004 10:26:24 -0700 (PDT)
msxml2.freethreadeddomdocument load
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;
        ss.load('stylesheet.xsl');

        // 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;
        src.load(source);

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





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

> OK Dave, then
> 
> http://www.perfectxml.com/articles/xml/XSLTInMSXML.asp
> 
> 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.
http://mobile.yahoo.com/maildemo 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.