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

How to load xsl and xml using js in netscape?

Subject: How to load xsl and xml using js in netscape?
From: "Liew Yean Lieng" <yean@xxxxxxxxxxxxxxxx>
Date: Thu, 3 Mar 2005 16:56:29 +0800
xmldom netscape
Hello everyone,

Sorry if this question seems basic, but I have to implement xml xsl
 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!


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))
%>

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.