Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass parameters from ASP to the XSL

Status
Not open for further replies.

urielk

Programmer
Jun 13, 2001
15
0
0
CA
I would like to transform my XML file base on dynamic information.

In the XSL file I included the param line:
<xsl:param name=&quot;AdminPriv&quot;>0</xsl:param>

The Transformation will show/hide table-rows according to the admin privilege...

In my ASP code I tried:

set xsl = CreateObject(&quot;Microsoft.XMLDOM&quot;)
xsl.async = false
xsl.load(Server.MapPath(&quot;cfgTables.xsl?AdminPriv=10&quot;))
Response.Write(xml.transformNode(xsl))

But the xsl.load function doesn't like the &quot;?...&quot; part.

Do I have to navigate the tree, look for the node and change the value using XMLDOM or there is a direct method to pass the parameter?
 
Hi

shouldn't be something like:

AdminPriv = 10

Set p = CreateObject(&quot;Scripting.Dictionary&quot;)
p.Add &quot;Variable_used_in_xsl&quot;, cstr(AdminPriv)

I'm not sure, maybe I'm talking about XML not XSL but, you can always try it!!

Good luck

J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top