Here's the example from the MSXML4 SDK -- you must have this documentation!
mk:@MSITStore:C:\Program%20Files\MSXML%204.0\doc\x mlsdk4.chm::/htm/xml_mth_ac_5pgy.htm
Dim xslt As New Msxml2.XSLTemplate40
Dim xslDoc As New Msxml2.FreeThreadedDOMDocument40
Dim xmlDoc As New Msxml2.DOMDocument40
Dim xslProc As IXSLProcessor
xslDoc.async = False
xslDoc.resolveExternals = False
xslDoc.Load "sample.xsl"
Set xslt.stylesheet = xslDoc
xmlDoc.async = False
xmlDoc.resolveExternals = False
xmlDoc.Load "books.xml"
If (xmlDoc.parseError.errorCode <0) Then
Dim myErr
Set myErr = xmlDoc.parseError
MsgBox("You have error " & myErr.reason)
Else
Set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
xslProc.addParameter "param1", "Hello"
xslProc.Transform
MsgBox xslProc.output
End IfFile Name: Sample.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:param name="param1"/>
<xsl:template match="/">
The parameter value was: <xsl:value-of select="$param1"/>
</xsl:template>
</xsl:stylesheet>
Cheers,
Dimitre Novatchev
<ni******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,
Thanks for the reply.
I am using asp pages to show the xml with xslt (i can have more than
one xml on the page then). So a normal url will be
http://xxx.com/blah.asp?articleid=15646
The code i use on the asp page to transform the xml/xslt is
<%
xmlf = "feeds/articles.xml"
stylef = "xsl/article.xsl"
set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
set xslDoc = Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.load(Server.Mappath(xmlf))
xslDoc.load(Server.Mappath(stylef))
Response.Write(xmlDoc.transformNode(xslDoc))
%>
Does this help? Could i pass the needed information in using asp?
Thanks
Nick