Changeset 32608 in project for wiki/eggref/4/html-utils


Ignore:
Timestamp:
07/23/15 03:28:23 (5 years ago)
Author:
Mario Domenech Goulart
Message:

html-utils (wiki): general note on generate-sxml? and specific note on strings/SXML mode for the headers keyword parameter for html-page (thanks to Hugo Arregui for bringing my attention to this).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/html-utils

    r30262 r32608  
    55=== Introduction
    66
    7 {{html-utils}} is an extension which provides procedures to ease the generation of some frequently used [X]HTML structures.
     7{{html-utils}} is an extension which provides procedures to ease the generation of some frequently used [SX]HTML structures.
     8
     9{{html-utils}} is based on [[/egg/html-tags|html-tags]], so it can generate strings or SXML code.  The html-tags' {{generate-sxml?}} parameter (yields a boolean) specifies whether html-utils should generate strings or SXML code.
     10
     11Example:
     12
     13  $ csi -n
     14  #;1> (use html-tags html-utils)
     15  #;2> (generate-sxml?)
     16  #f
     17  #;3> (itemize '(1 2 3))
     18  "<ul><li>1</li><li>2</li><li>3</li></ul>"
     19  #;4> (generate-sxml? #t)
     20  #t
     21  #;5> (itemize '(1 2 3))
     22  (ul (li 1) (li 2) (li 3))
     23
    824
    925=== Author
     
    5672Generates an HTML page containing {{contents}} (a string). If contents starts with {{"<body"}} (case insensitive), {{html-page}} won't use the {{<body>}} tag to enclose {{contents}}. The following keywords arguments may be used to customize the page:
    5773
    58 * {{headers}}: a string containing additional headers to be inserted in the section delimited by the {{<head>}} tag. Default = {{""}}.
     74* {{headers}}: a string (when not in SXML mode) or an SXML form (when in SXML mode) containing additional headers to be inserted in the section delimited by the {{<head>}} tag. Default = {{""}}.
    5975
    6076* {{title}}: the title for the page (to be used in the {{<title>}} tag). Default = {{""}}.
Note: See TracChangeset for help on using the changeset viewer.