Return to CLIP Main Page
Next: Writing Form Handlers in
Up: Document: pillow_sl_imperial
Previous: Responding to Input: Forms
- Use same techniques as with standard CGI apps.
- Only complication is form data parsing (names/values).
- Good solution: implement a parser (easy in LP/CLP) and produce
an attribute-value pair list or dictionary.
- Enables the symbolic treatment of form data, hiding the
low-level protocol behind.
E.g., predicates provided in PiLLoW:
- get_form_input(Dic) Translates input from the
form to a dictionary Dic of attribute=value pairs.
This is implemented using a simple DCG parser.
get_form_input(Dict)
Dict = [name='Anna', age=23]
- get_form_value(Dic,Var,Val) Gets
value Val for attribute Var in dictionary Dic.
- form_empty_value(V) Useful to check that a
value V from a text area is empty.
- my_url(URL) Returns in URL the Uniform
Resource Locator (WWW address) of this form.
A browser can be used as a graphical interface!
<herme@fi.upm.es>-< webmaster@clip.dia.fi.upm.es>
Last updated on Mon Mar 31 20:49:44 MET DST 1997