ASP
  Home arrow ASP arrow Page 2 - XSL Device Formatting Using the Microsoft ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

XSL Device Formatting Using the Microsoft XSL ISAPI Filter
By: Jean-Baptiste Minchelli
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2002-03-26

    Table of Contents:
  • XSL Device Formatting Using the Microsoft XSL ISAPI Filter
  • Installing the filter
  • Our sample application
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    XSL Device Formatting Using the Microsoft XSL ISAPI Filter - Installing the filter


    (Page 2 of 4 )

    The XSL ISAPI filter can be installed on both Windows 2000 Server and Windows 2000 Advanced Server. I also tested the filter on a Windows 2000 Professional however, and it works just fine. The filter may also work on a Windows NT 4.0 box but some limitations (the HTTP post method not being supported for example) make it nearly unusable.

    You must have MSXML 2.5 (or greater) installed on your PC before installing the filter. Download the Microsoft XSL ISAPI filter here. Extract the file to a directory on your hard drive and register the xslisapi2.dll file with regsvr32 (start -> run -> "regsvr32 c;\path\to\file\xslisapi2.dll").

    Do the following on the properties page of the the IIS administration tool (start -> run -> "mmc" then load the IIS snap-in):
    • Click on the ISAPI tab and add a new filter by giving it a name and by browsing to the xslisapi2.dll file.
    • Click OK twice.
    • If you come back to the ISAPI tab then you should see a green arrow in the status field, as shown here:

      Installing our ISAPI filter
    • Create a New virtual directory called xslisapi and set its root to the folder where you expanded the files. You can use the wizard to do this if you wish.
    • Test your installation by navigating to the installtest.pasp (which is installed with the filter) page in your browser:

      Testing our ISAPI filter
    Note that the XSL ISAPI filter will write files into the directory where .pasp files reside. Thus, if you have restricted directory permissions then you must change them to allow for this. You must also copy RedirectorPASP.asp into each directory that will contain .pasp files.

    There's one more thing that you must do to achieve support for each device that you want your XSL stylesheets to facilitate. You must add information about the devices that will access your application (including their name, markup-language used, content-type to send, etc.) to IIS's browsecap.ini file, which typically resides in c:\winnt\system32\inetsrv.

    The sample application that we're about to create will be reachable from the web and a WAP enabled browser (Openwave). I added the following lines to the end of my browsecap.ini file:

    ; Phone.com SDK Simulator v 4 BETA for WML

    [UPG1 UP/4.0.7]

    browser=Phone.com simulator

    target-markup=WML1.1

    content-type=text/vnd.wap.wml

    ; Openwave SDK 5.0

    [OPWV1/4.0 UP/5.0.1.2*]

    browser=Openwave SDK 5.0 simulator

    target-markup=WML1.1

    content-type=text/vnd.wap.wml


    Please note that IE is already defined (as are many common Web browsers) in the browscap.ini file.

    Features

    We've been raving on about the XSL ISAPI filter, but why would you as a developer want to use it? The main features of the XSL ISAPI filter are shown below:
    • Automatic execution of XSL stylesheets on the server, based on device types.
    • Dynamic generation of XML via ASP.
    • Chained execution of several stylesheets.
    • Configurable content-type, output encoding and character-sets.
    • Customizable error messages.
    • Support for the XSLTemplate object.
    The most impressive feature of the XSL ISAPI filter is its ability to generate XML on the fly – after which the XSL stylesheet is employed for presentation on the selected device.

    The XSL ISAPI Model

    The steps that the XSL ISAPI filter takes are shown below:
    • XML is generated from a file with the .pasp extension.
    • The resulting XML file is loaded.
    • The associated configuration file is read and the matching device chosen.
    • The associated XSL stylesheet is applied.
    • Post processes are executed (processing escape symbols, etc).
    • The response object (WML, HTML, etc) is sent to the device.

    More ASP Articles
    More By Jean-Baptiste Minchelli


     

    ASP ARTICLES

    - Central Scoreboard with Flash and ASP
    - Calorie Counter Using WAP and ASP
    - Creating PGP-Encrypted E-Mails Using ASP
    - Be My Guest in ASP
    - Session Replacement in ASP
    - Securing ASP Data Access Credentials Using t...
    - The Not So Ordinary Address Book
    - Adding and Displaying Data Easily via ASP an...
    - Sending Email From a Form in ASP
    - Adding Member Services in ASP
    - Removing Unconfirmed Members
    - Trapping HTTP 500.100 - Internal Server Error
    - So Many Rows, So Little Time! - Case Study
    - XDO: An XML Engine Class for Classic ASP
    - Credit Card Fraud Prevention Using ASP and C...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT