<%@ LANGUAGE = VBScript %>
<%
' Загружаем входящий документ
Dim source
Set source = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0")
source.load Server.MapPath("source.xml")
' Загружаем преобразование
Dim stylesheet
Set stylesheet =
Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0")
stylesheet.load Server.MapPath("stylesheet.xsl")
' Создаем объект XSLTemplate для преобразования
Dim templates
Set templates = Server.CreateObject("MSXML2.XSLTemplate")
templates.stylesheet = stylesheet.documentElement
' Создаем объект XSLT-процессора
Dim processor
Set processor = templates.createProcessor
processor.input = source
' Присваиваем параметру id значение параметра запроса id
' (то, что передано в sms.asp?id=...)
processor.addParameter "id", "" + Request.QueryString("id"), ""
' Выполняем преобразование
processor.transform
' Возвращаем результат
Response.Charset = "windows-1251"
Response.Write processor.output
%>
На рис. 9.11 показаны результаты работы sms.asp для id=p1 и id=p2.