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

Applying stylesheets externally

Subject: Applying stylesheets externally
From: Grant-Kathryn@xxxxxxxxxxxxxxxxx
Date: Mon, 13 May 2002 15:52:48 -0700
msmxl 4
Hi all,

I'm new to the list and new to XSL, and I have what seems like a very simple
question, but it has been surprisingly difficult to find an answer.
Hopefully someone can point me the right direction.

I have one XML file containing freight delay codes.  I have several XSL
files which filter the delay codes in various ways.  I want each XSL file to
transform the same XML data into a different file. 

I found this code on the web which I thought would do the job:

<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("delaycodes.xml")

// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("whatever.xsl")

// Transform
document.write(xml.transformNode(xsl))
</script>

This works fine for our employees using MSXML 3.x.  But my boss's boss has
MSXML 4.0.  I learned from an expert on another list that MSMXL 4 doesn't
support "Microsoft.XMLDOM" but instead requires "MSXML2.DOMDocument.4.0."
However, the latter generates an error for anyone using MSXML 3.x!

Obviously, a browser can transform an XML file using an XSL stylesheet when
that stylesheet is declared within the XML file.  So logically, it should be
easy to do the same thing when the XSL stylesheet is declared somewhere
other than in the XML file.

I could have my boss's boss to downgrade to MSXML 3.x, but that doesn't seem
like a good long-term solution since eventually everyone will be using MSXML
4. 

I'm a tech writer rather than a programmer (my programming "expertise" is
limited to Javascript).  The HTML files I author are stored on our server,
but I don't have admin privileges.  At this point, I don't have any XML/XSL
software other than the browser :) though hopefully that will change in the
future.  Right now I don't know enough about XML/XSL to know what software
to choose.  (I thought I'd better set the context for anyone who replies.)

If anyone can recommend a simple solution, preferably JavaScript, I'd
welcome it.

Thanks in advance,
Kathryn

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.