[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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 |
All, 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 http://192.168.22.105/default.asp?uid=2 which calls an an asp page... <% 'Load the XML set xml = Server.CreateObject("Microsoft.XMLDOM") xml.async = false xml.load(Server.MapPath("menu.xml")) 'Load the XSL set xsl = Server.CreateObject("Microsoft.XMLDOM") xsl.async = false searchValue1 = Request.querystring("uid") xsl.load(Server.MapPath("home.xsl")) Response.Write(xml.transformNode(xsl)) %> 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 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: [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 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] URL parameters in xsl, Américo Albuquerque | Thread | Re: [xsl] URL parameters in xsl, Jeni Tennison |
Re: [xsl] Processing an element onl, David Carlisle | Date | Re: [xsl] URL parameters in xsl, Jeni Tennison |
Month |