Subject: [xsl] Applying stylesheets externally From: Grant-Kathryn@xxxxxxxxxxxxxxxxx Date: Mon, 13 May 2002 15:52:48 -0700 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Losing xsl:param values w, CROFT, MICHAEL | Thread | Re: [xsl] Applying stylesheets exte, J.Pietschmann |
RE: [xsl] Losing xsl:param values w, CROFT, MICHAEL | Date | Re: [xsl] XSLT/XPath 2.0 (was "Iden, David Carlisle |
Month |