[xsl] passing params using asp into wml

Subject: [xsl] passing params using asp into wml
From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 9 Apr 2001 14:08:37 +0100

Im still struggling to setup searching in wml.  A user selects a link from a
page of wml, which sends a parameter to some asp.  The asp then passes the
parameter to a stylesheet using ixslprocessor (I think :-)  The error Im
getting is:

'The parameter is incorrect' line 11 searchwml.asp

I do something very similar for searching xml on the client side, which
works, but uses msxml v3 objects.  The host Im using reckons they have
installed msxml3, but if I use version specific prog ids, nothing works at

Can anybody point out where Im going wrong??

Many thanks


A link to this file takes the form '...searchwml.asp?param1=xxx'
<% Response.Buffer=True %>
   Dim xsl
   Dim template

   Set xsl = Server.CreateObject("Microsoft.FreeThreadedXMLDOM")
   xsl.async = false
   xsl.load (Server.MapPath("/xsl/searchwml.xsl"))

   Set template = Server.CreateObject("Msxml2.XSLTemplate")
   template.stylesheet = xsl
   processor = template.createProcessor()

   processor.input = xml
   processor.addParameter "param1",Request.QueryString("param1")

   Response.ContentType = "text/vnd.wap.wml"
   Response.Write "<?xml version=""1.0"" ?>"
   Response.Write "<!DOCTYPE wml PUBLIC ""-//WAPFORUM//DTD " & _
                  "WML 1.1//EN""

   Response.write (processor.output)

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"

<xsl:param name="param1"/>
<xsl:param name="PARAM1"
select="translate(translate(translate(translate($param1, $lowercase,
$uppercase),' ',''),'.',''),$apos,'')"/>

<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="apos">'</xsl:variable>

<xsl:variable name="results"
$lowercase, $uppercase),' ',''),'.',''),$apos,''),$PARAM1)]]" />

<xsl:template match="/">
    <card id="index" title="-The Bristol Dir-" newcontext="true">
      <xsl:for-each select="$results">
        <a><xsl:attribute name="href">wtai://wp/mc;<xsl:value-of
select="telephone"/></xsl:attribute><xsl:value-of select="name"/></a><br/>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread