Assembling the Scripts

Using the pieces already discussed, you can make an ASP script to dynamically create an XSLT style sheet like the one that appears in Listing 11.2. The code is somewhat general-purpose—at least in the context of the article document type. You can see the general plan in Figure 11.2.

Figure 11.2. This diagram shows how the different parts of the system interact to generate the XSLT style sheet.

You can include the script from another script, and pass in customizing variables. For example,

 <% if Request(“page”)=”” then dynxsl=”xmltest.asp” else dynxsl=Request(“page”) end if roottag=”article” schema=”schema.xml” css=”article.css” ...

Get Special Edition Using XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.