Subject: [xsl] xsl transformations on the client or server for NS6+ From: "jim" <xsl@xxxxxxxxxxxxxxxxx> Date: Tue, 1 Jul 2003 23:19:45 -0700 |
Hello everyone, Sorry if this question seems basic, but I have two important clients who need to support Netscape site visitors. I've been plugging away at this for hours reading up on client-side XSL Transformations versus server-side XSL Transformations. One article provided me with a JavaScript that it says works in IE 6+ and NS 6+/Mozilla 1.2+ at http://www.ebargoon.ca/sell/ebhtml.asp but it didn't work for me on Netscape. I even upgraded to Netscape 7.1 just to triple-check but no such luck. I've been reading up on "JavaScript/XSLT Bindings" at http://devedge.netscape.com/viewsource/2003/xslt-js/ and did a hack-and-paste job of using the bits of JavaScript they provide, but no luck on Netscape. My servers don't support ASP so what can I do? There was a somewhat related thread posted in 1999 at http://www.biglist.com/lists/xsl-list/archives/199910/msg00626.html with two opposing viewpoints, and I'm hoping that in 2003, there's a copy-and-paste solution for me either in JavaScript, or even PHP. Again, sorry if you think this post is off topic but it's the foundation of getting XSL Transformed to XHTML and I could really use some help here. Thanks kindly! Jim in Vancouver 1. Client Side XSL: Pros: JavaScript doesn't rely on type of server Cons: Doesn't work in Netscape <script type="text/javascript"> // Load XML var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("library.xml") // Load XSL var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("library.xsl") // Transform document.write(xml.transformNode(xsl)) </script> 2. ASP Server Side XSL: Pros: Works in latest IE and Netscape Cons: APS Servers Only <% 'Load XML set xml = Server.CreateObject("Microsoft.XMLDOM") xml.async = false xml.load(Server.MapPath("library.xml")) 'Load XSL set xsl = Server.CreateObject("Microsoft.XMLDOM") xsl.async = false xsl.load(Server.MapPath("library.xsl")) 'Transform file Response.Write(xml.transformNode(xsl)) %> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] generate-d( ) not working, Lars Huttar | Thread | Re: [xsl] xsl transformations on th, Rob Rohan |
[xsl] XSLT/JSP book?, Mitchell, Lincoln L. | Date | RE: [xsl] cookie not working inNets, N Y |
Month |