Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 10th, 2007, 11:47 AM
Authorized User
Points: 145, Level: 2
Points: 145, Level: 2 Points: 145, Level: 2 Points: 145, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2007
Location: , , .
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft.XMLDOM Alternative?

Hi All!

I am using this simple html example page (see code below) to "join" the XML and XSL file together and show in the Browser to avoid any possible timing issues I had before, etc. All works fine in the Internet Explorer but no other browser seems to be knowing what to do (Safari, etc.)

Is there any OTHER intelligent way of doing the same transformation but in a way that it is understood by the majority of browsers?

THANKS!!!
GAbi.

Code:
<html>
<body> 
<script language="javascript" for="window" event="onload"> 

// Load XML 

var xml = new ActiveXObject("Microsoft.XMLDOM") 
xml.async = false 
xml.load("appdemo.xml")

// Load the XSL 

var xsl = new ActiveXObject("Microsoft.XMLDOM") 
xsl.async = false 
xsl.load("appdemo.xsl")

// Do the transformation

document.write(xml.transformNode(xsl)) 

</script> 

</body> 

</html>
Reply With Quote
  #2 (permalink)  
Old September 10th, 2007, 12:29 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Lake a look at Sarissa.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #3 (permalink)  
Old September 10th, 2007, 01:00 PM
Authorized User
Points: 145, Level: 2
Points: 145, Level: 2 Points: 145, Level: 2 Points: 145, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2007
Location: , , .
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, Michael!

I took a quick look at it and it seems to be a thing residing on the client's machine that sort of "makes peace" for each browser - if I understand that right.

I am not sure at this point what is more efficcient - to program my pages to work in all possible browser or to ask the client to install Sarissa...

What would make sense to you?

Thanks again,
GAbi.

Reply With Quote
  #4 (permalink)  
Old September 10th, 2007, 01:04 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I prefer not to give advice on technology choices when I have so little information about the requirements. If you want consultancy, I can quote you a rate.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #5 (permalink)  
Old September 11th, 2007, 02:30 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You don't install Sarissa, it's a JavaScript wrapper around the different XML processor variations that gives you the appropriate version depending on which browser you are using. This means that you can use the Sarissa classes and code identically knowing, in theory, that it will work in all browsers. Another similar wrapper is Nicholas C. Zakas' zXml.

--

Joe (Microsoft MVP - XML)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript and XMLDOM kirthi97 XML 4 June 27th, 2006 02:22 AM
Pogramming the XmlDOM in C# sencee C# 5 March 10th, 2006 11:09 AM
access sub nodes using XMLDOM lian_a Classic ASP XML 2 January 19th, 2005 09:43 PM
XMLDOM problem braindog_43 Javascript How-To 2 January 16th, 2005 01:54 PM
XMLDOM problem braindog_43 XML 2 January 16th, 2005 01:38 PM



All times are GMT -4. The time now is 04:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.