You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mygrp <md...@gmail.com> on 2005/04/22 09:16:40 UTC

wml script

hi,
 im trying to validate a text field using wml script. The wml page is 
generated from an XML. This is the XML:
 *login.xml*
 Username
 <input title="User" type="text" name="mailuserid" /><br/>
</tr>
<tr>
Password
<input title="Password" type="password" name="mailpassword"/><br/><br/>
</tr>
</td>
<do type="accept" label="Login">
<go method="post" href="mail/mail.wml">
<postfield name="NEXT" value="VERIFY"/>
<postfield name="uid" value="$(mailuserid)"/>
<postfield name="mail-userid" value="$(mailuserid)"/>
<postfield name="mail-password" value="$(mailpassword)"/>
<postfield name="cmd" value="list-folder-messages"/>
<postfield name="folder" value="INBOX"/>
</go>
</do>
 The XSL which transforms this XML page into wml is:
*some.xsl
*
<xsl:template match="site">
 
<wml>
<card id="mail" title="Mail">
<p>
<xsl:apply-templates select="/site/mid-col-2/*"/>
<xsl:apply-templates select="/site/page:page"/>
</p>
</card>
</wml>
</xsl:template>

Now i wish to check if the text entered in the username and password text 
boxes are not empty. 

How can the wml script be called ?? is it included in the xsl or the xml. 
how is the pipeline written.

any suggestions please?

thanks.