Share via


Tutorial: Getting Started with XSLT

Hypertext Markup Language (HTML) has become a standard for presenting information on the Web. Although HTML tags are used to visually format information, they do not contain any information about the data.

For example, the top of an HTML page looks like the following code example.

<h1>Lucerne Publishing</h1>
<h2>Regional Sales Report</h2>
<p>Sales report for the West Coast, Central and East Coast regions.</p>

In this example, "Lucerne Publishing" is a large heading (h1); "Regional Sales Report" is a smaller heading (h2); and the rest is a paragraph (p). It is easy to understand these three pieces of information when they are displayed in a Web browser.

XML, on the other hand, is used to explicitly define the data. In XML, the preceding data looks like the following code example.

<heading>Lucerne Publishing</heading>
<subhead>Regional Sales Report</subhead>
<description>Sales report for the West Coast, Central and East Coast regions.</description>  

When information is stored in HTML, it is usually stored in its final form. In the past, this meant that if the data on a Web page must be presented in two different ways, two different HTML pages must be created, each storing the same data. Information stored in XML can be presented in a variety of ways for different audiences and scenarios. XML scripts and code can be used to interpret the data.

Unlike HTML, XML provides no formatting information. To display XML information on the Web, you use Extensible Stylesheet Language (XSL).

In combination, XML and XSL create a dynamic and flexible system for handling data and presentation. This tutorial will familiarize you with transforming XML data using XSL.

In this tutorial, you will create an XML document that stores the regional sales data for Lucerne Publishing. You will then create an XSL file that will display the regional sales data in the form of a sales report.

Tutorial Prerequisites

To run this tutorial:

  • The XSLT feature must have been included in the Platform Builder image on the device.
  • Microsoft Internet Explorer must have been included in the platform image.
  • An HTML editor, such as Notepad, must be installed.

In this tutorial, you will complete the following steps:

See Also

Exploring XSLT Capabilities | XSLT Developer Guide

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.