Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  XML (Extensible Markup Language)

Installing and Running the Microsoft XSL Command-line Utility


January 7, 1998


Step 1: Install the Microsoft XSL Command-line Utility

DownloadDownload MSXSL.EXE (zipped, 184K). MSXSL.EXE is self-contained -- no installation is necessary. Note that installation of Internet Explorer 4.0 Non-SBN link is required.


Step 2: Install the sample files

DownloadDownload the XSL Samples (zipped, 3.7K). Place the samples in the directory containing MSXSL.EXE.


Step 3: Run MSXSL

Open up a Command Prompt window and change directories to the one containing MSXSL.EXE. Then, from the command line, type:

msxsl -i sample.xml -s sample.xsl -o view1.html

Note: The "-i" option specifies the XML source document file name, "-s" specifies the file name of the XSL stylesheet, and "-o" specifies the file name of the resulting HTML file.

From an XML source document named sample.xml, the XSL processor will use an XSL stylesheet named sample.xsl to create an HTML output document named view1.html. Open view1.html with Internet Explorer 4.0 to view the results.


Step 4: Try processing sample.xml using a different stylesheet

This time, from the command line, type:

msxsl -i sample.xml -s alternate.xsl -o view2.html

The view2.html file will now offer an alternate view of the sample.xml document.

Hint: Take a look at the source of the view1.html and view2.html documents to see what the XSL processor actually creates. You'll notice that it is simply an HTML document describing how the text within sample.xml should be displayed.

Step 5: Try processing sample.xml using the default options

If the "-o" option is omitted, the XSL processor will give the HTML file it generates the same name as the XML source document (e.g., sample.html). Likewise, if the "-s" option is omitted, MSXSL processes the XML source document using the stylesheet with the same name as the XML source document (e.g., sample.xsl).

For example, the following command-line statement:

msxsl -i sample.xml

directs the XSL processor to use sample.xsl to generate a sample.html file.


Step 6: One more demo...

Try the hlist.xsl stylesheet. It is a generic stylesheet that works on any XML document. This also is a good example of generating Dynamic HTML from the XML data.

msxsl -i sample.xml -s hlist.xsl -o view3.html

Since this is generic stylesheet, you can even use it on XSL documents:

msxsl -i alternate.xsl -s hlist.xsl -o alternate.htm

HomeBack to the XSL home page


Did you find this article useful? Gripes? Compliments? Suggestions for other articles? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site