[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 13:10:59 -0700 (PDT)
javascript test for mozilla
Thanks Tom for the code and some helpful hints.

But what about these: 
        cache = new ActiveXObject("Msxml2.XSLTemplate.4.0");
        var proc = cache.createProcessor();
        ...
        proc.transform();

What is the Netscape equivalent?

- Dave


--- "Passin, Tom" <tpassin@xxxxxxxxxxxx> wrote:

> > From: dave frette [mailto:gohabitat@xxxxxxxxx]
> > 
> > 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?
> 
> I use the following to test for Mozilla -
> 
> function isMoz() {
>   try {
>     var xx = netscape.security.PrivilegeManager;
>     return true;
>   }
>   catch (e) {
>     return false;
>   }
> }
> 
> We're drifting OT here (yes, Tommie, I know, but aren't you too busy
> just now to attend to it??), but sometimes you can adjust for browser
> type without explicitly detecting it.  For example, I have used the
> following to get at (CSS) stylesheet rules even though IE and Mozilla
> use different names for the same object -
> 
> var stylesheet,rules;
> stylesheet = document.styleSheets[0];
> rules = stylesheet.rules||stylesheet.cssRules;
> 
> The first alternative works for IE but is undefined in Moz.  Undefined
> evaluates to false in a logic test (gotta love javascript!), and the
> second alternative (cssRules) works for any CSS2 compliant browser (one
> that uses the specified binding names).  
> 
> Cheers,
> 
> Tom P
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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.