I am trying the following:
It works fine, except for:
How can I load an XML fragment, such as this, so that I can pass it to the transform. It is important that this be recognized as an individual document for the rest to work.
Code:
<%@ Language=VBScript %>
<%
Dim objTemplate, objProcessor, strSortField, strGameNumber, objXML, objXSL, strHTML, aSTR
Set objXML = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
Set objXSL = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
set xmlParams = Server.CreateObject("Msxml2.DOMDocument.4.0")
objXML.async = False
if cstr(Request.QueryString("Key")) = "all" or cstr(Request.QueryString("Key")) = "" then
objXML.Load Server.MapPath("DVD_Cats.xml")
else
objXSL.loadXML("<cats TS=""""><cat name=""DVD_Cat_S.xml"" k=""S"" /></cats>")
end if
objXSL.async = False
objXSL.Load Server.MapPath("DVD_All_Temp.xsl")
Set objTemplate = Server.CreateObject("MSXML2.XSLTemplate.3.0")
Set objTemplate.stylesheet = objXSL
Set objProcessor = objTemplate.createProcessor
objProcessor.input = objXML
call objProcessor.addParameter("Key", cstr(Request.QueryString("Key")))
objProcessor.Transform
strHTML = objProcessor.output
Response.write strHTML
%>
It works fine, except for:
Code:
else
objXSL.loadXML("<cats TS=""""><cat name=""DVD_Cat_S.xml"" k=""S"" /></cats>")
end if
How can I load an XML fragment, such as this, so that I can pass it to the transform. It is important that this be recognized as an individual document for the rest to work.