RE: [xsl] querystring parameters

Subject: RE: [xsl] querystring parameters
From: "Casadome, Francisco Javier" <Francisco.Casadome@xxxxxxxxxxxxxx>
Date: Mon, 4 Feb 2002 17:59:31 +0100
Hola Aniceto !

Aquí tienes la función que uso yo para pasar parámetros al XSL desde el ASP.

function processXML (xml, xsl, parname1, par1, parname2, par2)
Dim xslTemp, xslDoc, xmlDocument, xslProc
	Set xslTemp = Server.CreateObject("Msxml2.XSLTemplate")
	Set xslDoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument")
	Set xmlDocument = Server.CreateObject("MSXML2.DOMDocument")
	xmlDocument.Load server.mappath (xml)
	xslDoc.load server.mappath (xsl)
	xslTemp.stylesheet = xslDoc
	set xslProc = xslTemp.createProcessor
	xslProc.input = xmlDocument
	xslProc.addParameter parname1, par1
	xslProc.addParameter parname2, par2
	xslProc.transform
	processXML = xslProc.output
end function

Está en VBScript. Puedes añadir los parámetros que quieras (ahora está para
dos).
En el XSL tienes que poner el mismo nombre que uses en la llamada con el
tag:

	<xsl:param name="parname1"/>
	<xsl:param name="parname2"/>

(fuera del template principal).

Un saludo,
Frank.

-----Original Message-----
From: Aniceto López [mailto:aniceto@xxxxxxxxxxxxx] 
Sent: Monday, February 04, 2002 5:32 PM
To: xsl-list
Subject: [xsl] querystring parameters

Hi all, newbie question:
this is the way we work:
the asp file is generating the xml asigning also a xsl and transforming.
sometimes when the asp is requested some values are added in the
queryString (i.e.: whatever.asp?msg=sometext&errortype=20)
is there anyway to get this values inside ths xsl from the querystring?
this is the idea: <xsl:variable name="dni" select="querystring.dni.value"/>
but don't know if possible or just one more of my stupid ideas

thanks in advance

Aniceto Lopez

 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