RE: [xsl] URL parameters in xsl

Subject: RE: [xsl] URL parameters in xsl
From: "Martin Lampen" <mlampe@xxxxxxxxxxx>
Date: Thu, 22 May 2003 04:16:38 -0500

I've tried all your suggestions from a couple of days ago and nothing works. I'm really losing sleep over it. 

I have a string

which calls an an asp page...

'Load the XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false

'Load the XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
searchValue1 = Request.querystring("uid")

which then (ideally) writes the uid value to the xsl stylesheet to use in match statements against XML data.

But still no luck!

-----Original Message-----
From: Américo Albuquerque [mailto:aalbuquerque@xxxxxxxxxxxxxxxx]
Sent: 20 July 2003 11:22
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] URL parameters in xsl


> -----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: [xsl] 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

On your stylesheet you'll to have a global 'uid' parameter

Hope this helps

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread