1. Using ASP and includes with XSL
2. How to use asp with xslt


Using ASP and includes with XSL

Ben Robb

There is nothing stopping you giving the XML file an .ASP extension - as long as it outputs well-formed XML on running. You should make sure you are requesting the XML page as a URL rather than via the file system.

The process would go something like this:

User requests the page.
The thread goes and requests the XML page through the IIS service.
The IIS service doesn't know (or care) whether or not it was requested internally or externally, and is told by the extension how to process it, so it compiles the ASP code and then sends (through HTTP) the text stream (which, by then, is a stream of well formed XML).
The original ASP page continues to process as usual.

A word of warning, though - this will cause a big hit on performance... since all of the processing is done in a single threaded model, you will have to wait for the XML page to finish compiling before completing the original (calling) ASP page - ie. you will get blocking. You have about 10-20 threads available on your IIS4 server, and if you block the threads for any longer than strictly necessary, you will have the unnerving experience of only being able to have 50 or so concurrent users on the box...

I assume that the content is coming from a database? If so, you should consider having a job that runs every time your content changes to update all of the (static) XML pages. That is fairly easy to incorporate into whatever you are using to keep the database up to date.


How to use asp with xslt

Joshua Allen

Microsoft has examples of passing parameters from ASP into XSLT. Sorry it doesn't use saxon or xt, though.

Paulo Gaspar adds How to start using the thing:

I advise downloading the MSXML May 2000 edition. You can find the link to its page from Microsoft's XML Developer Centre page: It is currently at the top right corner with a big picture;

Download both the parser ("Download the May 2000 MSXML Technology Preview Release (427 KB)") and its documentation ("Download the latest MSXML Technology Preview SDK (1.1 MB)"); (You will find this MSXML help quite easy to use and complete, although not 100% complete (especially in samples) or exact.)

Also check the Bug List page. You have a link for it in the same page where you have the above links;

If you have Internet Explorer, check the (MS HTML format) help file in the SDK for instructions on how to install MSXML3 in replace mode. This will allow you to easily check XSL transformations using static files with IE and this version of MSXML; (Check "XML Developer's Guide"/"XML DOM User Guide"/"Running Msxml3 in Replace Mode".)

Samples on programmatic use of MSXML can be found in Microsoft's site but there are a lot of extra samples in: asp today They have an XML topic page there.

I think that the "XSL ISAPI Filter 2" could also prove interesting. Check the ISAPI page also for this one.