SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : Building Smart Pages with ASP, XML and XSL
By Scott Isaacs

Two weeks ago we introduced how XML, XSL, and CSS all complement each other and will change how you build your future web-sites. If you are new to XML and XSL we recommend you read our first article before continuing. The original article explains the XML schema we used and provides an introduction to XSL transformations.

In our introductory article, we explained how XML and XSL can be used to create documents that target different browsers or mediums (eg., phones or TVs). However, we did not provide a real-world demonstration. Instead, we introduced XML and using XSL to transform the document into HTML for viewing and demonstrated how to perform this transformation on the client in IE5.

We will now go the next step and demonstrate a XML and XSL solution that runs on all browsers. Depending upon the browser, we wiill either perform the transformation on the server or send the raw XML and XSL for processing on the client. With this approach, we can author our document once and provide custom presentations targeted for specific types of clients. In this article, we will demonstrate 3 different presentations. Which one you receive depends on your browser. You will either receive

  • the raw XML and XSL version (IE5),
  • an IE4 version,
  • or an HTML 3.2 version.

To manage the processing, we wrote an ASP page that manipulates the Microsoft XML and XSL parsers. Next we introduce the server script.

Page 1:Building Smart Pages with ASP, XML and XSL
Page 2:The ASP Script
Page 3:Applying XSL on the Server

1