This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: querystring parameters
- From: Eric Vitiello <xsl-list at perceive dot net>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 4 Feb 2002 11:48:59 -0500
- Subject: Re: [xsl] querystring parameters
- References: <NFBBKOMALANALGBCPGHOMEODCBAA.aniceto@overthenet.tv>
- Reply-to: xsl-list at lists dot mulberrytech dot com
-- Aniceto López [Mon, 4 Feb 2002 17:31:54 +0100]:
>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
ahhh! I do this quite frequently. here's a bit of code:
' Load the XML
Set xml = CreateObject(DOMDocument_version)
xml.async = False
xml.loadXML(process_page)
'Load the XSL
Set xsl = CreateObject(DOMDocument_version)
xsl.async = False
xsl.setProperty "SelectionLanguage", "XPath"
xsl.load(process_base)
Set variableNode = xsl.SelectSingleNode("//*[@name='qualify']")
If IsObject(importNode) Then
variableNode.text = qualify
Else
Err.Raise 65535,"Unable to retrieve object for xsl:variable tag"
End If
in the xsl file i have the line:
<xsl:variable name="qualify"/>
the last six lines gets a reference to that node, and changes the value of the text portion of the node to the "qualify" variable, which I get from the response.form() object.
you can then run your transformation, and the $qualify variable will hold the proper value.
---
Eric Vitiello
Perceive Designs
<www.perceive.net>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list