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; 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Can one Use JavaScript to, Pieter Reint Siegers | Thread | RE: [xsl] Can one Use JavaScript to, Passin, Tom |
Re: [xsl] Can one Use JavaScript to, Emmanouil Batsis | Date | RE: [xsl] Can one Use JavaScript to, Passin, Tom |
Month |