[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

interpreting WML 1.3 content w/XSLT

Subject: interpreting WML 1.3 content w/XSLT
From: Craig Pfeifer <cpfeifer@xxxxxxx>
Date: Tue, 26 Dec 2000 14:58:43 -0500 (EST)
wml 1.3
All --

I'm trying to transform some wml 1.3 content into HTML, but I'm having a
problem with interpreting forms and variable resolution.

Most WML forms I have seen use markup like the following:

    <p>
       Symbol:
      <br/>
      <input name="v36" value=""/>
      <a title="Submit"
href="http://ye.yahoo.com/http://finance.yahoo.com/q?s=$(v36:escape)">
Submit</a>
      &nbsp; 
    </p>

Here, we see that the input field's name is 'v36', and the data from this
field in placed into the URL by the WML browser by variable substitution
( $ precedes a WML variable reference) when the user 'submits' the form
(by executing the hyperlink). This is a case I think I can handle, but
gets complicated by the fact that WML doesn't have an enclosing form
element.

This is the problem that I run into:

  <card title="Search">
    <onevent type="onenterforward">
      <refresh>
        <setvar name="U" value="/exec/obidos/ct/text/vnd.wap.wml/-/"/>
        <setvar name="T" value="tg/aa/wml/uk/"/>
        <setvar name="S" value="subst/aa/wml/uk/"/>
      </refresh>
    </onevent>
    <do name="ok" type="accept" label="OK">
      <go
href="$(U)$(T)searchall/-/blended/$(item:escape)/1/202-6049706-5439020"/>
    </do>
    <p mode="wrap" align="left">
       Please enter search word(s): 
      <br/>
      <input name="item"/>
      <a
href="$(U)$(T)searchall/-/blended/$(item:escape)/1/202-6049706-5439020">Go</a>
    </p>
  </card>

Here I am up a big creek, because the variables are defined in one scope
and referenced in another! I can't use xsl:variable, because if I try to
create a variable of global scope (i.e. not in a template), I can only
assign it once, and if I create a template to read in and assign all of
the setvar elemets, they will be out of scope when I process the next
element.

I'm afraid that I'll have to do this w/DOM or SAX parsing...

Any ideas?

Thanks,

Craig


--------
Craig Pfeifer
www.cpfeifer.org




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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.