\raggedbottom
\input texinfo @c -*- texinfo -*-
@c ------------------------------------------------
@c WARNING: Do not edit this file (pillow_doc.texic)
@c It has been generated automatically from file:
@c /home/clip/Systems/ciao/library/pillow/pillow_doc.pl
@c ------------------------------------------------
@c %**start of header
@setfilename pillow_doc
@settitle The PiLLoW Web Programming Library
@c @paragraphindent 0
@setchapternewpage odd
@c @footnotestyle separate
@defcodeindex pd
@defcodeindex te
@defcodeindex gl
@iftex
@c @smallbook
@afourpaper
@tolerance 10000
@hbadness 10000
@end iftex
@c %**end of header
@ifinfo
The PiLLoW library (``Programming in Logic Languages on the Web'') is a public domain Internet/WWW programming library for Logic Programming Systems which simplifies the process of writing applications for such environment. The library provides facilities for generating HTML or XML structured documents by handling them as Herbrand terms, producing HTML forms, writing form handlers, processing HTML templates, accessing and parsing WWW documents (either HTML or XML), accessing code posted at HTTP addresses, etc.
The PiLLoW library has been developed in the context of the &-Prolog and Ciao systems, but it has been adapted to a number of popular Logic Programming systems. Note, however, that this manual is written for the Ciao system, so if you use it in other systems, minor details in the documentation may not completely agree. For example, whereas in Ciao the library is a package which loads modules @code{html} and @code{http}, in the other systems it is just one module @code{pillow}. Thus, do not consider the @emph{Library usage} information in other systems.
PiLLoW is distributed under the
@glindex GNU Library General Public License
GNU Library General Public License.
Copyright @copyright{} D. Cabeza and M. Hermenegildo
This document may be freely read, stored, reproduced, disseminated, translated or quoted by any means and on any medium provided the following conditions are met:
@enumerate
@item Every reader or user of this document acknowledges that is aware that no guarantee is given regarding its contents, on any account, and specifically concerning veracity, accuracy and fitness for any purpose.
@item No modification is made other than cosmetic, change of representation format, translation, correction of obvious syntactic errors, or as permitted by the clauses below.
@item Comments and other additions may be inserted, provided they clearly appear as such; translations or fragments must clearly refer to an original complete version, preferably one that is easily accessed whenever possible.
@item Translations, comments and other additions or modifications must be dated and their author(s) must be identifiable (possibly via an alias).
@item This licence is preserved and applies to the whole document with modifications and additions (except for brief quotes), independently of the representation format.
@item Any reference to the "official version", "original version" or "how to obtain original versions" of the document is preserved verbatim. Any copyright notice in the document is preserved verbatim. Also, the title and author(s) of the original document should be clearly mentioned as such.
@item In the case of translations, verbatim sentences mentioned in (6.) are preserved in the language of the original document accompanied by verbatim translations to the language of the traslated document. All translations state clearly that the author is not responsible for the translated work. This license is included, at least in the language in which it is referenced in the original version.
@item Whatever the mode of storage, reproduction or dissemination, anyone able to access a digitized version of this document must be able to make a digitized copy in a format directly usable, and if possible editable, according to accepted, and publicly documented, public standards.
@item Redistributing this document to a third party requires simultaneous redistribution of this licence, without modification, and in particular without any further condition or restriction, expressed or implied, related or not to this redistribution. In particular, in case of inclusion in a database or collection, the owner or the manager of the database or the collection renounces any right related to this inclusion and concerning the possible uses of the document after extraction from the database or the collection, whether alone or in relation with other documents.
@end enumerate
Any incompatibility of the above clauses with legal, contractual or judiciary decisions or constraints implies a corresponding limitation of reading, usage, or redistribution rights for this document, verbatim or modified.
@end ifinfo
@titlepage
@title The PiLLoW Web Programming Library
@c @font@authorrm=cmbx10 scaled @magstep2
@subtitle REFERENCE MANUAL
@subtitle @emph{Generated/Printed on:} @today
@author Daniel Cabeza
@author Manuel Hermenegildo
@author @email{clip@@clip.dia.fi.upm.es}
@author @uref{http://www.clip.dia.fi.upm.es/}
@author The CLIP Group
@author School of Computer Science
@author Technical University of Madrid
@c Copyright page
@page
@vskip 0pt plus 1filll
Copyright @copyright{} D. Cabeza and M. Hermenegildo
This document may be freely read, stored, reproduced, disseminated, translated or quoted by any means and on any medium provided the following conditions are met:
@enumerate
@item Every reader or user of this document acknowledges that is aware that no guarantee is given regarding its contents, on any account, and specifically concerning veracity, accuracy and fitness for any purpose.
@item No modification is made other than cosmetic, change of representation format, translation, correction of obvious syntactic errors, or as permitted by the clauses below.
@item Comments and other additions may be inserted, provided they clearly appear as such; translations or fragments must clearly refer to an original complete version, preferably one that is easily accessed whenever possible.
@item Translations, comments and other additions or modifications must be dated and their author(s) must be identifiable (possibly via an alias).
@item This licence is preserved and applies to the whole document with modifications and additions (except for brief quotes), independently of the representation format.
@item Any reference to the "official version", "original version" or "how to obtain original versions" of the document is preserved verbatim. Any copyright notice in the document is preserved verbatim. Also, the title and author(s) of the original document should be clearly mentioned as such.
@item In the case of translations, verbatim sentences mentioned in (6.) are preserved in the language of the original document accompanied by verbatim translations to the language of the traslated document. All translations state clearly that the author is not responsible for the translated work. This license is included, at least in the language in which it is referenced in the original version.
@item Whatever the mode of storage, reproduction or dissemination, anyone able to access a digitized version of this document must be able to make a digitized copy in a format directly usable, and if possible editable, according to accepted, and publicly documented, public standards.
@item Redistributing this document to a third party requires simultaneous redistribution of this licence, without modification, and in particular without any further condition or restriction, expressed or implied, related or not to this redistribution. In particular, in case of inclusion in a database or collection, the owner or the manager of the database or the collection renounces any right related to this inclusion and concerning the possible uses of the document after extraction from the database or the collection, whether alone or in relation with other documents.
@end enumerate
Any incompatibility of the above clauses with legal, contractual or judiciary decisions or constraints implies a corresponding limitation of reading, usage, or redistribution rights for this document, verbatim or modified.
@end titlepage
@iftex
@pageno 1
@end iftex
@ifinfo
@node Top, Summary, (dir), (dir)
@top The PiLLoW Web Programming Library
@end ifinfo
@c Contents:
@c @summarycontents
@contents
@c (component)
@menu
* Summary::
* Introduction::
* HTML/XML/CGI programming::
* HTTP conectivity::
* PiLLoW types::
* References::
* Predicate/Method Definition Index::
* Regular Type Definition Index::
* Global Index::
@end menu
@node Summary, Introduction, Top, Top
@comment node-name, next, previous, up
@unnumbered Summary
The PiLLoW library (``Programming in Logic Languages on the Web'') is a public domain Internet/WWW programming library for Logic Programming Systems which simplifies the process of writing applications for such environment. The library provides facilities for generating HTML or XML structured documents by handling them as Herbrand terms, producing HTML forms, writing form handlers, processing HTML templates, accessing and parsing WWW documents (either HTML or XML), accessing code posted at HTTP addresses, etc.
The PiLLoW library has been developed in the context of the &-Prolog and Ciao systems, but it has been adapted to a number of popular Logic Programming systems. Note, however, that this manual is written for the Ciao system, so if you use it in other systems, minor details in the documentation may not completely agree. For example, whereas in Ciao the library is a package which loads modules @code{html} and @code{http}, in the other systems it is just one module @code{pillow}. Thus, do not consider the @emph{Library usage} information in other systems.
PiLLoW is distributed under the
@glindex GNU Library General Public License
GNU Library General Public License.
@c (component)
@node Introduction, HTML/XML/CGI programming, Summary, Top
@comment node-name, next, previous, up
@chapter Introduction
@glindex WWW, interfacing with
@glindex XML
@glindex CGI
@glindex HTML
@glindex HTTP
This package implements the PiLLoW library [CHV96]. The following three chapters document, respectively, the predicates for HTML/XML/CGI programming, the predicate for HTTP conectivity, and the types used in the definition of the predicates (key for fully understanding the other predicates). You can find a paper and some additional information in the
@glindex library/pillow/doc
@code{library/pillow/doc} directory of the distribution, and in the WWW at @uref{http://clip.dia.fi.upm.es/Software/pillow/pillow.html}. There is also a
@glindex PiLLoW on-line tutorial
@emph{PiLLoW on-line tutorial} (slides) at @uref{http://clip.dia.fi.upm.es/logalg/slides/C_pillow/C_pillow.html} which illustrates the basic features and provides a number of examples of PiLLoW use.
@menu
* Installing PiLLoW::
* Usage and interface (pillow)::
@end menu
@node Installing PiLLoW, Usage and interface (pillow), Introduction, Introduction
@comment node-name, next, previous, up
@section Installing PiLLoW
To correctly install PiLLoW, first, make sure you downloaded the right version of PiLLoW (there are different versions for different LP/CLP systems; the version that comes with Ciao is of course the right one for Ciao). Then, please follow these steps:
@enumerate
@item Copy the files in the @code{images} directory to a WWW accessible directory in your server.
@item Edit the file
@glindex icon_address.pl
@code{icon_address.pl} and change the fact to point to the URL to be used to access the images above.
@item In the Ciao system the files are in the correct place, in other systems copy the files
@glindex pillow.pl
@code{pillow.pl} and
@glindex icon_address.pl
@code{icon_address.pl} to a suitable directory so that your Prolog system will find them.
@end enumerate
@node Usage and interface (pillow), , Installing PiLLoW, Introduction
@comment node-name, next, previous, up
@section Usage and interface (@code{pillow})
@cartouche
@itemize @bullet{}
@item @strong{Library usage:}
@code{:- use_package(pillow).}
or
@code{:- module(...,...,[pillow]).}
@item @strong{New operators defined:}
@glindex $/2
@code{$/2} [150,xfx],
@glindex $/1
@code{$/1} [150,fx].
@end itemize
@end cartouche
@c (component)
@node HTML/XML/CGI programming, HTTP conectivity, Introduction, Top
@comment node-name, next, previous, up
@chapter HTML/XML/CGI programming
@c -------------------------------------------------
@c WARNING: Do not edit this file (html.texic)
@c It has been generated automatically from file:
@c /home/clip/Systems/ciao/library/pillow/html.pl
@c -------------------------------------------------
@strong{Author(s):} Daniel Cabeza, Manuel Hermenegildo, Sacha Varma.
@strong{Version:} 1.7#40 (2001/1/5, 19:7:40 CET)
@strong{Version of last change:} 1.5#114 (2000/4/11, 20:23:43 CEST)
This module implements the predicates of the PiLLoW package related to
@glindex HTML
HTML/
@glindex XML
XML generation and parsing,
@glindex CGI
CGI and form handlers programming, and in general all the predicates which do not imply the use of the HTTP protocol.
@menu
* Usage and interface (html)::
* Documentation on exports (html)::
* Documentation on multifiles (html)::
* Other information (html)::
@end menu
@node Usage and interface (html), Documentation on exports (html), HTML/XML/CGI programming, HTML/XML/CGI programming
@comment node-name, next, previous, up
@section Usage and interface (@code{html})
@cartouche
@itemize @bullet{}
@item @strong{Library usage:}
@code{:- use_module(library(html)).}
@item @strong{Exports:}
@itemize @minus
@item @emph{Predicates:}
@glindex output_html/1
@code{output_html/1},
@glindex html2terms/2
@code{html2terms/2},
@glindex xml2terms/2
@code{xml2terms/2},
@glindex html_template/3
@code{html_template/3},
@glindex html_report_error/1
@code{html_report_error/1},
@glindex get_form_input/1
@code{get_form_input/1},
@glindex get_form_value/3
@code{get_form_value/3},
@glindex form_empty_value/1
@code{form_empty_value/1},
@glindex form_default/3
@code{form_default/3},
@glindex set_cookie/2
@code{set_cookie/2},
@glindex get_cookies/1
@code{get_cookies/1},
@glindex url_query/2
@code{url_query/2},
@glindex my_url/1
@code{my_url/1},
@glindex url_info/2
@code{url_info/2},
@glindex url_info_relative/3
@code{url_info_relative/3},
@glindex form_request_method/1
@code{form_request_method/1},
@glindex icon_address/2
@code{icon_address/2},
@glindex html_protect/1
@code{html_protect/1},
@glindex http_lines/3
@code{http_lines/3}.
@item @emph{Multifiles:}
@glindex html_expansion/2
@code{html_expansion/2}.
@end itemize
@end itemize
@end cartouche
@node Documentation on exports (html), Documentation on multifiles (html), Usage and interface (html), HTML/XML/CGI programming
@comment node-name, next, previous, up
@section Documentation on exports (@code{html})
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{output_html/1 (pred)}}}
@temp
@end iftex
@pdindex output_html/1
@glindex output_html/1
@deffn PREDICATE output_html/1:
@code{output_html(HTMLTerm)}
Outputs @code{HTMLTerm}, interpreted as an
@glindex html_term/1
@code{html_term/1}, to current output stream.
@strong{Usage:}
@itemize @minus
@item @emph{The following properties should hold at call time:}
@code{HTMLTerm} is a term representing HTML code.
@iftex
@hfill
@end iftex
(@code{html_term/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{html2terms/2 (pred)}}}
@temp
@end iftex
@pdindex html2terms/2
@glindex html2terms/2
@deffn PREDICATE html2terms/2:
@code{html2terms(String,Terms)}
@code{String} is a character list containing HTML code and @code{Terms} is its prolog structured representation.
@strong{Usage 1:}
@itemize @minus
@item @emph{Description:} Translates an HTML-term into the HTML code it represents.
@item @emph{The following properties should hold at call time:}
@code{String} is a free variable.
@iftex
@hfill
@end iftex
(@code{var/1})
@code{Terms} is a term representing HTML code.
@iftex
@hfill
@end iftex
(@code{html_term/1})
@item @emph{The following properties hold upon exit:}
@code{String} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@end itemize
@strong{Usage 2:}
@itemize @minus
@item @emph{Description:} Translates HTML code into a structured HTML-term.
@item @emph{Calls should, and exit will be compatible with:}
@code{Terms} is a term representing HTML code in canonical form.
@iftex
@hfill
@end iftex
(@code{canonic_html_term/1})
@item @emph{The following properties should hold at call time:}
@code{String} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@item @emph{The following properties hold upon exit:}
@code{Terms} is a term representing HTML code in canonical form.
@iftex
@hfill
@end iftex
(@code{canonic_html_term/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{xml2terms/2 (pred)}}}
@temp
@end iftex
@pdindex xml2terms/2
@glindex xml2terms/2
@deffn PREDICATE xml2terms/2:
@code{xml2terms(String,Terms)}
@code{String} is a character list containing XML code and @code{Terms} is its prolog structured representation.
@strong{Usage 1:}
@itemize @minus
@item @emph{Description:} Translates a XML-term into the XML code it represents.
@item @emph{The following properties should hold at call time:}
@code{String} is a free variable.
@iftex
@hfill
@end iftex
(@code{var/1})
@code{Terms} is a term representing HTML code.
@iftex
@hfill
@end iftex
(@code{html_term/1})
@item @emph{The following properties hold upon exit:}
@code{String} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@end itemize
@strong{Usage 2:}
@itemize @minus
@item @emph{Description:} Translates XML code into a structured XML-term.
@item @emph{Calls should, and exit will be compatible with:}
@code{Terms} is a term representing XML code in canonical form.
@iftex
@hfill
@end iftex
(@code{canonic_xml_term/1})
@item @emph{The following properties should hold at call time:}
@code{String} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@item @emph{The following properties hold upon exit:}
@code{Terms} is a term representing XML code in canonical form.
@iftex
@hfill
@end iftex
(@code{canonic_xml_term/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{html_template/3 (pred)}}}
@temp
@end iftex
@pdindex html_template/3
@glindex html_template/3
@deffn PREDICATE html_template/3:
@code{html_template(Chars,Terms,Dict)}
Interprets @code{Chars} as an HTML template returning in @code{Terms} the corresponding structured HTML-term, which includes variables, and unifying @code{Dict} with a dictionary of those variables (an incomplete list of @emph{name}@code{=}@emph{Var} pairs). An HTML template is standard HTML code, but in which ``slots'' can be defined and given an identifier. These slots represent parts of the HTML code in which other HTML code can be inserted, and are represented in the HTML-term as free variables. There are two kinds of variables in templates:
@itemize @bullet{}
@item Variables representing page contents. A variable with name @emph{name} is defined with the special tag @code{}@emph{name}@code{}.
@item Variables representing tag attributes. They occur as an attribute or an attribute value starting with @code{_}, followed by its name, which must be formed by alphabetic characters.
@end itemize
As an example, suposse the following HTML template:
@smallexample
content
@end smallexample
The following query in the Ciao toplevel shows how the template is parsed, and the dictionary returned:
@smallexample
?- file_to_string('template.html',_S), html_template(_S,Terms,Dict).
Dict = [bgcolor=_A,content=_B|_],
Terms = [env(html,[],["
",env(body,[bgcolor=_A],["
",_B,"
"]),"
"]),"
"] ?
yes
@end smallexample
If a dictionary with values is supplied at call time, then variables are unified accordingly inside the template:
@smallexample
?- file_to_string('template.html',_S),
html_template(_S,Terms,[content=b("hello world!"),bgcolor="white"]).
Terms = [env(html,[],["
",env(body,[bgcolor="white"],["
",b("hello world!"),"
"]),"
"]),"
"] ?
yes
@end smallexample
@strong{Usage:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{Terms} is a term representing HTML code in canonical form.
@iftex
@hfill
@end iftex
(@code{canonic_html_term/1})
@code{Dict} is a list.
@iftex
@hfill
@end iftex
(@code{list/1})
@item @emph{The following properties should hold at call time:}
@code{Chars} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@item @emph{The following properties hold upon exit:}
@code{Terms} is a term representing HTML code in canonical form.
@iftex
@hfill
@end iftex
(@code{canonic_html_term/1})
@code{Dict} is a list.
@iftex
@hfill
@end iftex
(@code{list/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{html_report_error/1 (pred)}}}
@temp
@end iftex
@pdindex html_report_error/1
@glindex html_report_error/1
@deffn PREDICATE html_report_error/1:
@strong{Usage:} @code{html_report_error(Error)}
@itemize @minus
@item @emph{Description:} Outputs error @code{Error} as a standard HTML page.
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{get_form_input/1 (pred)}}}
@temp
@end iftex
@pdindex get_form_input/1
@glindex get_form_input/1
@deffn PREDICATE get_form_input/1:
@code{get_form_input(Dict)}
Translates input from the form (with either the POST or GET methods, and even with CONTENT_TYPE multipart/form-data) to a dictionary @code{Dict} of @emph{attribute}=@emph{value} pairs. It translates empty values (which indicate only the presence of an attribute) to the atom @code{'$empty'}, values with more than one line (from text areas or files) to a list of lines as strings, the rest to atoms or numbers (using
@glindex name/2
@code{name/2}).
@strong{Usage:}
@itemize @minus
@item @emph{The following properties should hold at call time:}
@code{Dict} is a free variable.
@iftex
@hfill
@end iftex
(@code{var/1})
@item @emph{The following properties hold upon exit:}
@code{Dict} is a dictionary of values of the attributes of a form. It is a list of @code{form_assignment}
@iftex
@hfill
@end iftex
(@code{form_dict/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{get_form_value/3 (pred)}}}
@temp
@end iftex
@pdindex get_form_value/3
@glindex get_form_value/3
@deffn PREDICATE get_form_value/3:
@code{get_form_value(Dict,Var,Val)}
Unifies @code{Val} with the value for attribute @code{Var} in dictionary @code{Dict}. Does not fail: value is @code{''} if not found (this simplifies the programming of form handlers when they can be accessed directly).
@strong{Usage:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{Val} is a value of an attribute of a form.
@iftex
@hfill
@end iftex
(@code{form_value/1})
@item @emph{The following properties should hold at call time:}
@code{Dict} is a dictionary of values of the attributes of a form. It is a list of @code{form_assignment}
@iftex
@hfill
@end iftex
(@code{form_dict/1})
@code{Var} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@item @emph{The following properties hold upon exit:}
@code{Val} is a value of an attribute of a form.
@iftex
@hfill
@end iftex
(@code{form_value/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{form_empty_value/1 (pred)}}}
@temp
@end iftex
@pdindex form_empty_value/1
@glindex form_empty_value/1
@deffn PREDICATE form_empty_value/1:
@strong{Usage:} @code{form_empty_value(Term)}
@itemize @minus
@item @emph{Description:} Checks that @code{Term}, a value comming from a text area is empty (can have spaces, newlines and linefeeds).
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{form_default/3 (pred)}}}
@temp
@end iftex
@pdindex form_default/3
@glindex form_default/3
@deffn PREDICATE form_default/3:
@strong{Usage:} @code{form_default(Val,Default,NewVal)}
@itemize @minus
@item @emph{Description:} Useful when a form is only partially filled, or when the executable can be invoked either by a link or by a form, to set form defaults. If the value of @code{Val} is empty then @code{NewVal}=@code{Default}, else @code{NewVal}=@code{Val}.
@item @emph{The following properties should hold at call time:}
@code{Val} is currently a term which is not a free variable.
@iftex
@hfill
@end iftex
(@code{nonvar/1})
@code{Default} is currently a term which is not a free variable.
@iftex
@hfill
@end iftex
(@code{nonvar/1})
@code{NewVal} is a free variable.
@iftex
@hfill
@end iftex
(@code{var/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{set_cookie/2 (pred)}}}
@temp
@end iftex
@pdindex set_cookie/2
@glindex set_cookie/2
@deffn PREDICATE set_cookie/2:
@code{set_cookie(Name,Value)}
Sets a cookie of name @code{Name} and value @code{Value}. Must be invoked before outputting any data, including the @code{cgi_reply} html-term.
@strong{Usage:}
@itemize @minus
@item @emph{The following properties should hold at call time:}
@code{Name} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@code{Value} is an atomic term (an atom or a number).
@iftex
@hfill
@end iftex
(@code{constant/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{get_cookies/1 (pred)}}}
@temp
@end iftex
@pdindex get_cookies/1
@glindex get_cookies/1
@deffn PREDICATE get_cookies/1:
@code{get_cookies(Cookies)}
Unifies @code{Cookies} with a dictionary of @emph{attribute}=@emph{value} pairs of the active cookies for this URL.
@strong{Usage:}
@itemize @minus
@item @emph{The following properties should hold at call time:}
@code{Cookies} is a free variable.
@iftex
@hfill
@end iftex
(@code{var/1})
@item @emph{The following properties hold upon exit:}
@code{Cookies} is a dictionary of values. It is a list of pairs @emph{atom}=@emph{constant}.
@iftex
@hfill
@end iftex
(@code{value_dict/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{url_query/2 (pred)}}}
@temp
@end iftex
@pdindex url_query/2
@glindex url_query/2
@deffn PREDICATE url_query/2:
@code{url_query(Dict,URLArgs)}
Translates a dictionary @code{Dict} of parameter values into a string @code{URLArgs} for appending to a URL pointing to a form handler.
@strong{Usage:}
@itemize @minus
@item @emph{The following properties should hold at call time:}
@code{Dict} is a dictionary of values. It is a list of pairs @emph{atom}=@emph{constant}.
@iftex
@hfill
@end iftex
(@code{value_dict/1})
@code{URLArgs} is a free variable.
@iftex
@hfill
@end iftex
(@code{var/1})
@item @emph{The following properties hold upon exit:}
@code{URLArgs} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{my_url/1 (pred)}}}
@temp
@end iftex
@pdindex my_url/1
@glindex my_url/1
@deffn PREDICATE my_url/1:
@code{my_url(URL)}
Unifies @code{URL} with the Uniform Resource Locator (WWW address) of this cgi executable.
@strong{Usage:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{URL} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@item @emph{The following properties hold upon exit:}
@code{URL} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{url_info/2 (pred)}}}
@temp
@end iftex
@pdindex url_info/2
@glindex url_info/2
@deffn PREDICATE url_info/2:
@code{url_info(URL,URLTerm)}
Translates a URL @code{URL} to a Prolog structure @code{URLTerm} which details its various components, and vice-versa. For now non-HTTP URLs make the predicate fail.
@strong{Usage 1:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@item @emph{The following properties should hold at call time:}
@code{URL} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@item @emph{The following properties hold upon exit:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@end itemize
@strong{Usage 2:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@item @emph{The following properties should hold at call time:}
@code{URL} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@item @emph{The following properties hold upon exit:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@end itemize
@strong{Usage 3:}
@itemize @minus
@item @emph{The following properties should hold at call time:}
@code{URL} is a free variable.
@iftex
@hfill
@end iftex
(@code{var/1})
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@item @emph{The following properties hold upon exit:}
@code{URL} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{url_info_relative/3 (pred)}}}
@temp
@end iftex
@pdindex url_info_relative/3
@glindex url_info_relative/3
@deffn PREDICATE url_info_relative/3:
@code{url_info_relative(URL,BaseURLTerm,URLTerm)}
Translates a relative URL @code{URL} which appears in the HTML page refered to by @code{BaseURLTerm} into @code{URLTerm}, a Prolog structure containing its absolute parameters. Absolute URLs are translated as with
@glindex url_info/2
@code{url_info/2}. E.g.
@smallexample
url_info_relative("dadu.html",
http('www.foo.com',80,"/bar/scoob.html"), Info)
@end smallexample
gives @code{Info = http('www.foo.com',80,"/bar/dadu.html")}.
@strong{Usage 1:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@item @emph{The following properties should hold at call time:}
@code{URL} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@code{BaseURLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@item @emph{The following properties hold upon exit:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@end itemize
@strong{Usage 2:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@item @emph{The following properties should hold at call time:}
@code{URL} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@code{BaseURLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@item @emph{The following properties hold upon exit:}
@code{URLTerm} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{form_request_method/1 (pred)}}}
@temp
@end iftex
@pdindex form_request_method/1
@glindex form_request_method/1
@deffn PREDICATE form_request_method/1:
@strong{Usage:} @code{form_request_method(Method)}
@itemize @minus
@item @emph{Description:} Unifies @code{Method} with the method of invocation of the form handler (@code{GET} or @code{POST}).
@item @emph{The following properties hold upon exit:}
@code{Method} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{icon_address/2 (pred)}}}
@temp
@end iftex
@pdindex icon_address/2
@glindex icon_address/2
@deffn PREDICATE icon_address/2:
@code{icon_address(Img,IAddress)}
The PiLLoW image @code{Img} has URL @code{IAddress}.
@strong{Usage:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{Img} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@code{IAddress} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@item @emph{The following properties hold upon exit:}
@code{Img} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@code{IAddress} is an atom.
@iftex
@hfill
@end iftex
(@code{atm/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{html_protect/1 (pred)}}}
@temp
@end iftex
@pdindex html_protect/1
@glindex html_protect/1
@deffn PREDICATE html_protect/1:
@code{html_protect(Goal)}
Calls @code{Goal}. If an error occurs during its execution, or it fails, an HTML page is output informing about the incident. Normaly the whole execution of a CGI is protected thus.
@emph{Meta-predicate} with arguments: @code{html_protect(goal)}.
@strong{Usage:}
@itemize @minus
@item @emph{Calls should, and exit will be compatible with:}
@code{Goal} is a term which represents a goal, i.e., an atom or a structure.
@iftex
@hfill
@end iftex
(@code{callable/1})
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{http_lines/3 (pred)}}}
@temp
@end iftex
@pdindex http_lines/3
@glindex http_lines/3
@deffn PREDICATE http_lines/3:
@strong{Usage:} @code{http_lines(Lines,String,Tail)}
@itemize @minus
@item @emph{Description:} @code{Lines} is a list of the lines with occur in @code{String} until @code{Tail}. The lines may end UNIX-style or DOS-style in @code{String}, in @code{Lines} they have not end of line characters. Suitable to be used in DCGs.
@item @emph{Calls should, and exit will be compatible with:}
@code{Lines} is a list of @code{string}s.
@iftex
@hfill
@end iftex
(@code{list/2})
@code{String} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@code{Tail} is a string (a list of character codes).
@iftex
@hfill
@end iftex
(@code{string/1})
@end itemize
@end deffn
@sp 1
@node Documentation on multifiles (html), Other information (html), Documentation on exports (html), HTML/XML/CGI programming
@comment node-name, next, previous, up
@section Documentation on multifiles (@code{html})
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{html_expansion/2 (pred)}}}
@temp
@end iftex
@pdindex html_expansion/2
@glindex html_expansion/2
@deffn PREDICATE html_expansion/2:
The predicate is @emph{multifile}.
@strong{Usage:} @code{html_expansion(Term,Expansion)}
@itemize @minus
@item @emph{Description:} Hook predicate to define macros. Expand occurrences of @code{Term} into @code{Expansion}, in
@glindex output_html/1
@code{output_html/1}. Take care to not transform something into itself!
@end itemize
@end deffn
@sp 1
@node Other information (html), , Documentation on multifiles (html), HTML/XML/CGI programming
@comment node-name, next, previous, up
@section Other information (@code{html})
The code uses input from from L. Naish's forms and F. Bueno's previous Chat interface. Other people who have contributed is (please inform us if we leave out anybody): Markus Fromherz, Samir Genaim.
@c (component)
@node HTTP conectivity, PiLLoW types, HTML/XML/CGI programming, Top
@comment node-name, next, previous, up
@chapter HTTP conectivity
@c -------------------------------------------------
@c WARNING: Do not edit this file (http.texic)
@c It has been generated automatically from file:
@c /home/clip/Systems/ciao/library/pillow/http.pl
@c -------------------------------------------------
@strong{Author(s):} Daniel Cabeza.
@strong{Version:} 1.7#40 (2001/1/5, 19:7:40 CET)
@strong{Version of last change:} 1.3#114 (1999/11/24, 0:57:16 MET)
This module implements the
@glindex HTTP
HTTP protocol, which allows retrieving data from HTTP servers.
@menu
* Usage and interface (http)::
* Documentation on exports (http)::
@end menu
@node Usage and interface (http), Documentation on exports (http), HTTP conectivity, HTTP conectivity
@comment node-name, next, previous, up
@section Usage and interface (@code{http})
@cartouche
@itemize @bullet{}
@item @strong{Library usage:}
@code{:- use_module(library(http)).}
@item @strong{Exports:}
@itemize @minus
@item @emph{Predicates:}
@glindex fetch_url/3
@code{fetch_url/3}.
@end itemize
@end itemize
@end cartouche
@node Documentation on exports (http), , Usage and interface (http), HTTP conectivity
@comment node-name, next, previous, up
@section Documentation on exports (@code{http})
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{fetch_url/3 (pred)}}}
@temp
@end iftex
@pdindex fetch_url/3
@glindex fetch_url/3
@deffn PREDICATE fetch_url/3:
@code{fetch_url(URL,Request,Response)}
Fetches the document pointed to by @code{URL} from Internet, using request parameters @code{Request}, and unifies @code{Response} with the parameters of the response. Fails on timeout. Note that redirections are not handled automatically, that is, if @code{Response} contains terms of the form @code{status(redirection,301,_)} and @code{location(NewURL)}, the program should in most cases access location @code{NewURL}.
@strong{Usage:} @code{fetch_url(URL,Request,Response)}
@itemize @minus
@item @emph{The following properties should hold at call time:}
@code{URL} specifies a URL.
@iftex
@hfill
@end iftex
(@code{url_term/1})
@code{Request} is a list of @code{http_request_param}s.
@iftex
@hfill
@end iftex
(@code{list/2})
@item @emph{The following properties hold upon exit:}
@code{Response} is a list of @code{http_response_param}s.
@iftex
@hfill
@end iftex
(@code{list/2})
@end itemize
@end deffn
@sp 1
@c (component)
@node PiLLoW types, References, HTTP conectivity, Top
@comment node-name, next, previous, up
@chapter PiLLoW types
@c -------------------------------------------------
@c WARNING: Do not edit this file (pillow_types.texic)
@c It has been generated automatically from file:
@c /home/clip/Systems/ciao/library/pillow/pillow_types.pl
@c -------------------------------------------------
@strong{Author(s):} Daniel Cabeza.
Here are defined the regular types used in the documentation of the predicates of the PiLLoW package.
@menu
* Usage and interface (pillow_types)::
* Documentation on exports (pillow_types)::
@end menu
@node Usage and interface (pillow_types), Documentation on exports (pillow_types), PiLLoW types, PiLLoW types
@comment node-name, next, previous, up
@section Usage and interface (@code{pillow_types})
@cartouche
@itemize @bullet{}
@item @strong{Library usage:}
@code{:- use_module(library(pillow_types)).}
@item @strong{Exports:}
@itemize @minus
@item @emph{Regular Types:}
@glindex canonic_html_term/1
@code{canonic_html_term/1},
@glindex canonic_xml_term/1
@code{canonic_xml_term/1},
@glindex html_term/1
@code{html_term/1},
@glindex form_dict/1
@code{form_dict/1},
@glindex form_assignment/1
@code{form_assignment/1},
@glindex form_value/1
@code{form_value/1},
@glindex value_dict/1
@code{value_dict/1},
@glindex url_term/1
@code{url_term/1},
@glindex http_request_param/1
@code{http_request_param/1},
@glindex http_response_param/1
@code{http_response_param/1},
@glindex http_date/1
@code{http_date/1},
@glindex weekday/1
@code{weekday/1},
@glindex month/1
@code{month/1},
@glindex hms_time/1
@code{hms_time/1}.
@end itemize
@end itemize
@end cartouche
@node Documentation on exports (pillow_types), , Usage and interface (pillow_types), PiLLoW types
@comment node-name, next, previous, up
@section Documentation on exports (@code{pillow_types})
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{canonic_html_term/1 (regtype)}}}
@temp
@end iftex
@teindex canonic_html_term/1
@glindex canonic_html_term/1
@deffn REGTYPE canonic_html_term/1:
A term representing HTML code in canonical, structured way. It is a list of terms defined by the following predicate:
@smallexample
canonic_html_item(comment(S)) :-
string(S).
canonic_html_item(declare(S)) :-
string(S).
canonic_html_item(env(Tag,Atts,Terms)) :-
atm(Tag),
list(Atts,tag_attrib),
canonic_html_term(Terms).
canonic_html_item($(Tag,Atts)) :-
atm(Tag),
list(Atts,tag_attrib).
canonic_html_item(S) :-
string(S).
@end smallexample
@smallexample
tag_attrib(Att) :-
atm(Att).
tag_attrib(Att=Val) :-
atm(Att),
string(Val).
@end smallexample
Each structure represents one HTML construction:
@table @asis
@item @strong{env(}@emph{tag}@strong{,}@emph{attribs}@strong{,}@emph{terms}@strong{)}
An HTML environment, with name @emph{tag}, list of attributes @emph{attribs} and contents @emph{terms}.
@item @strong{$(}@emph{tag}@strong{,}@emph{attribs}@strong{)}
An HTML element of name @emph{tag} and list of attributes @emph{attribs}. @code{($)/2} is defined by the pillow package as an infix, binary operator.
@item @strong{comment(}@emph{string}@strong{)}
An HTML comment (translates to/from @code{}).
@item @strong{declare(}@emph{string}@strong{)}
An HTML declaration, they are used only in the header (translates to/from @code{}).
@item @emph{string}
Normal text is represented as a list of character codes.
@end table
For example, the term
@smallexample
env(a,[href="www.therainforestsite.com"],
["Visit ",img$[src="TRFS.gif"]])
@end smallexample
is output to (or parsed from):
@smallexample
Visit
@end smallexample
@strong{Usage:} @code{canonic_html_term(HTMLTerm)}
@itemize @minus
@item @emph{Description:} @code{HTMLTerm} is a term representing HTML code in canonical form.
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{canonic_xml_term/1 (regtype)}}}
@temp
@end iftex
@teindex canonic_xml_term/1
@glindex canonic_xml_term/1
@deffn REGTYPE canonic_xml_term/1:
A term representing XML code in canonical, structured way. It is a list of terms defined by the following predicate (see
@glindex tag_attrib/1
@code{tag_attrib/1} definition in
@glindex canonic_html_term/1
@code{canonic_html_term/1}):
@smallexample
canonic_xml_item(Term) :-
canonic_html_item(Term).
canonic_xml_item(xmldecl(Atts)) :-
list(Atts,tag_attrib).
canonic_xml_item(env(Tag,Atts,Terms)) :-
atm(Tag),
list(Atts,tag_attrib),
canonic_xml_term(Terms).
canonic_xml_item(elem(Tag,Atts)) :-
atm(Tag),
list(Atts,tag_attrib).
@end smallexample
In addition to the structures defined by
@glindex canonic_html_term/1
@code{canonic_html_term/1} (the @code{($)/2} structure appears only in malformed XML code), the following structures can be used:
@table @asis
@item @strong{elem(}@emph{tag}@strong{,}@emph{atts}@strong{)}
Specifies an XML empty element of name @emph{tag} and list of attributes @emph{atts}. For example, the term
@smallexample
elem(arc,[weigh="3",begin="n1",end="n2"])
@end smallexample
is output to (or parsed from):
@smallexample
@end smallexample
@item @strong{xmldecl(}@emph{atts}@strong{)}
Specifies an XML declaration with attributes @emph{atts} (translates to/from @code{})
@end table
@strong{Usage:} @code{canonic_xml_term(XMLTerm)}
@itemize @minus
@item @emph{Description:} @code{XMLTerm} is a term representing XML code in canonical form.
@end itemize
@end deffn
@sp 1
@iftex
@edef@temp{@noexpand@writetocentry{@realbackslash unnumbsubsubsecentry{html_term/1 (regtype)}}}
@temp
@end iftex
@teindex html_term/1
@glindex html_term/1
@deffn REGTYPE html_term/1:
A term which represents HTML or XML code in a structured way. In addition to the structures defined by
@glindex canonic_html_term/1
@code{canonic_html_term/1} or
@glindex canonic_xml_term/1
@code{canonic_xml_term/1}, the following structures can be used:
@table @asis
@item @strong{begin(}@emph{tag}@strong{,}@emph{atts}@strong{)}
It translates to the start of an HTML environment of name @emph{tag} and attributes @emph{atts}. There exists also a @strong{begin(@emph{tag})} structure. Useful, in conjunction with the next structure, when including in a document output generated by an existing piece of code (e.g. @emph{tag} = @code{pre}). Its use is otherwise discouraged.
@item @strong{end(}@emph{tag}@strong{)}
Translates to the end of an HTML environment of name @emph{tag}.
@item @strong{start}
Used at the beginning of a document (translates to @code{}).
@item @strong{end}
Used at the end of a document (translates to @code{}).
@item @code{--}
Produces a horizontal rule (translates to @code{}).
@item @strong{\\}
Produces a line break (translates to @code{ }).
@item @strong{$}
Produces a paragraph break (translates to @code{
}).
@item @strong{image(}@emph{address}@strong{)}
Used to include an image of address (URL) @emph{address} (equivalent to @code{img$[src=}@emph{address}@code{]}).
@item @strong{image(}@emph{address}@strong{,}@emph{atts}@strong{)}
As above with the list of attributes @emph{atts}.
@item @strong{ref(}@emph{address}@strong{,}@emph{text}@strong{)}
Produces a hypertext link, @emph{address} is the URL of the referenced resource, @emph{text} is the text of the reference (equivalent to @code{a([href=}@emph{address}@code{],}@emph{text}@code{)}).
@item @strong{label(}@emph{name}@strong{,}@emph{text}@strong{)}
Labels @emph{text} as a target destination with label @emph{name} (equivalent to @code{a([name=}@emph{name}@code{],}@emph{text}@code{)}).
@item @strong{heading(}@emph{n}@strong{,}@emph{text}@strong{)}
Produces a heading of level @emph{n} (between 1 and 6), @emph{text} is the text to be used as heading. Useful when one wants a heading level relative to another heading (equivalent to @code{h}@emph{n}@code{(}@emph{text}@code{)}).
@item @strong{itemize(}@emph{items}@strong{)}
Produces a list of bulleted items, @emph{items} is a list of corresponding HTML terms (translates to a @code{
} environment).
@item @strong{enumerate(}@emph{items}@strong{)}
Produces a list of numbered items, @emph{items} is a list of corresponding HTML terms (translates to a @code{} environment).
@item @strong{description(}@emph{defs}@strong{)}
Produces a list of defined items, @emph{defs} is a list whose elements are definitions, each of them being a Prolog sequence (composed by @code{','/2} operators). The last element of the sequence is the definition, the other (if any) are the defined terms (translates to a @code{
} environment).
@item @strong{nice_itemize(}@emph{img}@strong{,}@emph{items}@strong{)}
Produces a list of bulleted items, using the image @emph{img} as bullet. The predicate
@glindex icon_address/2
@code{icon_address/2} provides a colored bullet.
@item @strong{preformatted(}@emph{text}@strong{)}
Used to include preformatted text, @emph{text} is a list of HTML terms, each element of the list being a line of the resulting document (translates to a @code{
} environment).
@item @strong{verbatim(}@emph{text}@strong{)}
Used to include text verbatim, special HTML characters (@code{<,>,&,"} and space) are translated into its quoted HTML equivalent.
@item @strong{prolog_term(}@emph{term}@strong{)}
Includes any prolog term @emph{term}, represented in functional notation. Variables are output as @code{_}.
@item @strong{nl}
Used to include a newline in the HTML source (just to improve human readability).
@item @strong{entity(}@emph{name}@strong{)}
Includes the entity of name @emph{name} (ISO-8859-1 special character).
@item @strong{start_form(}@emph{addr}@strong{,}@emph{atts}@strong{)}
Specifies the beginning of a form. @emph{addr} is the address (URL) of the program that will handle the form, and @emph{atts} other attributes of the form, as the method used to invoke it. If @emph{atts} is not present (there is only one argument) the method defaults to POST.
@item @strong{start_form}
Specifies the beginning of a form without assigning address to the handler, so that the form handler will be the cgi-bin executable producing the form.
@item @strong{end_form}
Specifies the end of a form.
@item @strong{checkbox(}@emph{name}@strong{,}@emph{state}@strong{)}
Specifies an input of type @code{checkbox} with name @emph{name}, @emph{state} is @code{on} if the checkbox is initially checked.
@item @strong{radio(}@emph{name}@strong{,}@emph{value}@strong{,}@emph{selected}@strong{)}
Specifies an input of type @code{radio} with name @emph{name} (several radio buttons which are interlocked must share their name), @emph{value} is the the value returned by the button, if @emph{selected}=@emph{value} the button is initially checked.
@item @strong{input(}@emph{type}@strong{,}@emph{atts}@strong{)}
Specifies an input of type @emph{type} with a list of attributes @emph{atts}. Possible values of @emph{type} are @code{text}, @code{hidden}, @code{submit}, @code{reset}, ldots
@item @strong{textinput(}@emph{name}@strong{,}@emph{atts}@strong{,}@emph{text}@strong{)}
Specifies an input text area of name @emph{name}. @emph{text} provides the default text to be shown in the area, @emph{atts} a list of attributes.
@item @strong{option(}@emph{name}@strong{,}@emph{val}@strong{,}@emph{options}@strong{)}
Specifies a simple option selector of name @emph{name}, @emph{options} is the list of available options and @emph{val} is the initial selected option (if @emph{val} is not in @emph{options} the first item is selected by default) (translates to a @code{