GNU Info

Info Node: (slib.info)HTML

(slib.info)HTML


Next: HTML Tables Prev: Programs and Arguments Up: Textual Conversion Packages
Enter node , (file) or (file)node

HTML
====

  `(require 'html-form)'

 - Function: html:atval txt
     Returns a string with character substitutions appropriate to send
     TXT as an "attribute-value".

 - Function: html:plain txt
     Returns a string with character substitutions appropriate to send
     TXT as an "plain-text".

 - Function: html:meta name content
     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', ....

 - Function: html:http-equiv name content
     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', ....

 - Function: html:meta-refresh delay uri
 - Function: html:meta-refresh delay
     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.

 - Function: html:head title backlink tags ...
 - Function: html:head title backlink
 - Function: html:head title
     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.

 - Function: html:body body ...
     Returns HTML string to end a page.

 - Function: html:pre line1 line ...
     Returns the strings LINE1, LINES as "PRE"formmated plain text
     (rendered in fixed-width font).  Newlines are inserted between
     LINE1, LINES.  HTML tags (`<tag>') within LINES will be visible
     verbatim.

 - Function: html:comment line1 line ...
     Returns the strings LINE1 as HTML comments.

HTML Forms
==========

 - Function: html:form method action body ...
     The symbol METHOD is either `get', `head', `post', `put', or
     `delete'.  The strings BODY form the body of the form.
     `html:form' returns the HTML "form".

 - Function: html:hidden name value
     Returns HTML string which will cause NAME=VALUE in form.

 - Function: html:checkbox pname default
     Returns HTML string for check box.

 - Function: html:text pname default size ...
     Returns HTML string for one-line text box.

 - Function: html:text-area pname default-list
     Returns HTML string for multi-line text box.

 - Function: html:select pname arity default-list foreign-values
     Returns HTML string for pull-down menu selector.

 - Function: html:buttons pname arity default-list foreign-values
     Returns HTML string for any-of selector.

 - Function: form:submit submit-label command
 - Function: form:submit submit-label
     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.

 - Function: form:image submit-label image-src
     The IMAGE-SRC appears on the button which submits the form.

 - Function: form:reset
     Returns a string which generates a "reset" button.

 - Function: form:element pname arity default-list foreign-values
     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

 - Function: form:delimited pname doc aliat arity default-list
          foreign-values
     Returns a HTML string for a form element embedded in a line of a
     delimited list.  Apply map `form:delimited' to the list returned by
     `command->p-specs'.

 - Function: command->p-specs rdb command-table command
     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)))


automatically generated by info2www version 1.2.2.9