[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] passing params using asp into wml
Hi, 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 all! Can anybody point out where Im going wrong?? Many thanks Andrew A link to this file takes the form '...searchwml.asp?param1=xxx' ===searchwml.asp=== <% 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") processor.transform() Response.ContentType = "text/vnd.wap.wml" Response.Write "<?xml version=""1.0"" ?>" Response.Write "<!DOCTYPE wml PUBLIC ""-//WAPFORUM//DTD " & _ "WML 1.1//EN"" ""http://www.wapforum.org/DTD/wml_1.1.xml"">" Response.write (processor.output) %> ===searchwml.xsl=== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <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" select="TBD/business[*[contains(translate(translate(translate(translate(., $lowercase, $uppercase),' ',''),'.',''),$apos,''),$PARAM1)]]" /> <xsl:template match="/"> <wml> <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:for-each> </card> </wml> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|