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

Re: Using IE5/B2 XSL from Command Line

Subject: Re: Using IE5/B2 XSL from Command Line
From: "Steve Muench" <SMUENCH@xxxxxxxxxxxxx>
Date: 10 Dec 98 14:07:37 -0800
wscript.createobject microsoft.xmldom
Seems to work even better if you change the last line below:

| (2) Wrote the following little script in JavaScript:
|
|    // This file is:  xslproc.js
|    var data = WScript.CreateObject("Microsoft.XMLDOM");
|    var style = WScript.CreateObject("Microsoft.XMLDOM");
|    data.load(WScript.Arguments(0));
|    style.load(WScript.Arguments(1));
|    WScript.Echo( data.transformNode( style.documentElement ));

To:

    WScript.Echo( data.documentElement.transformNode( style.documentElement
));
____________________________/

instead...

____________________________________________________________________________
 Steve  | Consulting PM & XML Technology Evangelist | smuench@xxxxxxxxxx
 Muench |      Java Business Objects Dev Team       | geocities.com/~smuench

         Get to know JBO at http://javatools/jbo/owa/walkthrough
                Do you XML? http://xml.us.oracle.com
--- Begin Message ---
Subject: Using IE5/B2 XSL from Command Line
From: "Steve Muench" <SMUENCH@xxxxxxxxxxxxx>
Date: 10 Dec 98 12:11:29
In my experimentation with IE5 Beta2, I've found it useful to be
able to use the XSL transformation features from the command line
to "try things out" without writing code to do the transformation.

If you install the "Windows Scripting Host" (a little engine that
lets you run JS or VB scripts as if they were .BAT/.CMD files)
you can very easily build yourself a little utility to make this easy.

In case this might be useful to you, here's what I did:

(1) Downloaded and installed Windows Scripting Host
    http://msdn.microsoft.com/scripting/windowshost/default.htm

(2) Wrote the following little script in JavaScript:

    // This file is:  xslproc.js
    var data = WScript.CreateObject("Microsoft.XMLDOM");
    var style = WScript.CreateObject("Microsoft.XMLDOM");
    data.load(WScript.Arguments(0));
    style.load(WScript.Arguments(1));
    WScript.Echo( data.transformNode( style.documentElement ));

(3) Wrote the following little BAT file to make running the above script
    easier:

    @REM This file is:  xsl.bat
    @echo off
    @cscript //nologo xslproc.js %1 %2    REM xsl.bat

Then I can "try out" combining an XML document and a stylesheet at
the command line with:

   C:\>  xsl mydoc.xml mystyle.xsl

This dumps the transformed output to standard out so you could redirect it
like:

   C:\>  xsl mydoc.xml mystyle.xsl > mynewtree.xml


Quick and dirty, but works well for me.

Have fun...

____________________________________________________________________________
 Steve  | Consulting PM & XML Technology Evangelist | smuench@xxxxxxxxxx
 Muench |      Java Business Objects Dev Team       | geocities.com/~smuench

         Get to know JBO at http://javatools/jbo/owa/walkthrough
                Do you XML? http://xml.us.oracle.com


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

--- End Message ---
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.