Canada Post - Sell Online Developer's Site
XSL Resources

Introduction

XSL is a descriptive language to ease the generation of HTML1 pages from XML documents.

Using XSL

There is two common ways to generate HTML from XML using XSL.
  1. Client side

    Using this method, you must ensure that client browsers fully supports XML with embedded style sheet (XSL) since the generation of the HTML is done by the browser.
    As of this writing, only Microsoft IE 5.0 and the newly released Netscape 6.0 support this feature.

  2. Server side

    Using this method, virtualy any browser can be used since the HTML is generated by the server.

Samples

The following XSL sample show how to display the Delivery Products from an XML document provided by Sell Online.

Note that this is the actual XSL style sheet used by our server to transform XML to HTML. It does not create a full HTML page but rather a portion which needs to be included within an HTML page. It also includes additional hidden information.

Feel free to use and modify it for your own use. However, we do not provide any support for XSL. You are invited to send us comments, suggestions or improvements regarding these examples.

A Note about ASP/COM

For those who want to use the Microsoft XSL implementation, it is included in the their XML SDK which can be downloaded from their Web site. Note that the way to create objects to be used by XSL is to create "MSXML2.DOMDocument" objects.


1. It is also possible to generate other format using appropriate tools.