Returns a string with character substitutions appropriate to send txt as an attribute-value.
Returns a string with character substitutions appropriate to send txt as an plain-text.
Returns a tag of meta-information suitable for passing as the third argument to
html:head
. The tag produced is ‘<META NAME="name" CONTENT="content">’. The string or symbol name can be ‘author’, ‘copyright’, ‘keywords’, ‘description’, ‘date’, ‘robots’, ....
Returns a tag of HTTP information suitable for passing as the third argument to
html:head
. The tag produced is ‘<META HTTP-EQUIV="name" CONTENT="content">’. The string or symbol name can be ‘Expires’, ‘PICS-Label’, ‘Content-Type’, ‘Refresh’, ....
Returns a tag suitable for passing as the third argument to
html:head
. If uri argument is supplied, then delay seconds after displaying the page with this tag, Netscape or IE browsers will fetch and display uri. Otherwise, delay seconds after displaying the page with this tag, Netscape or IE browsers will fetch and redisplay this page.
Returns header string for an HTML page named title. If backlink is a string, it is used verbatim between the ‘H1’ tags; otherwise title is used. If string arguments tags ... are supplied, then they are included verbatim within the <HEAD> section.
Returns the strings line1, lines as PREformmated plain text (rendered in fixed-width font). Newlines are inserted between line1, lines. HTML tags (‘<tag>’) within lines will be visible verbatim.
The symbol method is either
get
,head
,post
,put
, ordelete
. The strings body form the body of the form.html:form
returns the HTML form.
Returns HTML string for pull-down menu selector.
Returns HTML string for any-of selector.
The string or symbol submit-label appears on the button which submits the form. If the optional second argument command is given, then
*command*=
command and*button*=
submit-label are set in the query. Otherwise,*command*=
submit-label is set in the query.
The image-src appears on the button which submits the form.
Returns a string which generates an INPUT element for the field named pname. The element appears in the created form with its representation determined by its arity and domain. For domains which are foreign-keys:
single
- select menu
optional
- select menu
nary
- check boxes
nary1
- check boxes
If the foreign-key table has a field named ‘visible-name’, then the contents of that field are the names visible to the user for those choices. Otherwise, the foreign-key itself is visible.
For other types of domains:
single
- text area
optional
- text area
boolean
- check box
nary
- text area
nary1
- text area
Returns a HTML string for a form element embedded in a line of a delimited list. Apply map
form:delimited
to the list returned bycommand->p-specs
.
Returns a list of the ‘visible-name’ or first fields of table tab.
The symbol command-table names a command table in the rdb relational database. The symbol command names a key in command-table.
command->p-specs
returns a list of lists of pname, doc, aliat, arity, default-list, and foreign-values. The returned list has one element for each parameter of command command.This example demonstrates how to create a HTML-form for the ‘build’ command.
(require (in-vicinity (implementation-vicinity) "build.scm")) (call-with-output-file "buildscm.html" (lambda (port) (display (string-append (html:head 'commands) (html:body (sprintf #f "<H2>%s:</H2><BLOCKQUOTE>%s</BLOCKQUOTE>\\n" (html:plain 'build) (html:plain ((comtab 'get 'documentation) 'build))) (html:form 'post (or "http://localhost:8081/buildscm" "/cgi-bin/build.cgi") (apply html:delimited-list (apply map form:delimited (command->p-specs build '*commands* 'build))) (form:submit 'build) (form:reset)))) port)))