Hi.
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Martin Lampen
> Sent: Tuesday, May 20, 2003 10:22 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: URL parameters in xsl
>
>
> Thanks for all your replies. None of these solutions work
> though. the xsl file won't recognise the url - is this
> because it's generated from an .asp file!
>
> help!!!
>
> martin
Others already gave you hints how to do it with xslt, here is how you
could do it in asp:
' Create a template
Set xslt = Server.CreateObject("Msxml2.XSLTemplate")
' Create the xsl document as free threaded
Set xslDoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument")
' load the stylesheet
xslDoc.async = false
xslDoc.load "stylesheet.xsl"
' set the templates stylesheet to yours
set xslt.stylesheet = xslDoc
' Create the xml document
set xmlDoc = Server.CreateObject("Msxml2.DOMDocument")
' load the xml
xmlDoc.async = false
xmlDoc.load "file.xml"
' Create the processor
Set xslProc = xslt.createProcessor
' set the processor imput to your xml doc
xslProc.input = xmlDoc
' set the output, probably to the Response object
Xslproc.output = Response
' add the parameters
xslProc.addParameter "uid", Request.QueryString("uid")
' run the transformation
xslProc.transform
On your stylesheet you'll to have a global 'uid' parameter
Hope this helps
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|