Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/eggdoc|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags:eggs]] == eggdoc An egg documentation tool. [[toc:]] === Overview '''Note to egg authors''': Please don't document your eggs using eggdoc anymore! The canonical documentation source is the Chicken wiki, and wiki pages are the recommended way to document eggs. eggdoc is an SXML documentation tool which produces HTML pages for Chicken eggs. It uses the sxml-transforms extension to transform your SXML via a comprehensive XML stylesheet, simplifying the creation of egg documentation. It's also quite customizable. Other eggs, such as [[eggdoc-svnwiki]] and [[eggdoc-texinfo]], can be loaded to transform your source document into other formats. === API ==== Generic API <procedure>(eggdoc:transform DOC [STYLESHEET])</procedure> <procedure>(eggdoc->html DOC [STYLESHEET])</procedure> Transform the SXML document {{DOC}} using the optional SXSLT stylesheet {{STYLESHEET}}. If not specified, the built-in stylesheet will be used, which is also accessible with {{(eggdoc:make-stylesheet)}}. Transformation output is displayed to {{current-output-port}}. Also returns the parse result as an alist (see {{eggdoc:result}}). This is a generic transformer which by default outputs HTML, but can be overridden by other eggs (such as [[eggdoc-svnwiki]]) to output other formats. By default, {{eggdoc:transformer}} will invoke {{eggdoc->html/really}}. {{eggdoc->html}} is a deprecated alias to {{eggdoc:transform}} and historically was the entry point to eggdoc. The name is a misnomer, as it can be overridden to generate other formats. <procedure>(eggdoc:make-stylesheet DOC)</procedure> Returns the default SXSLT stylesheet. This is a procedure because the stylesheet is built dynamically using the contents of the SXML document {{DOC}}. For example, the value of the (name) tag is retrieved at build time and inserted in the header and the usage information. You can append to or modify this stylesheet and then pass it to {{eggdoc->html}}. This is done in doctype's eggdoc to provide a new tag, (strings), which makes the SXML much cleaner. This procedure invokes {{eggdoc:make-html-stylesheet}} by default. However, it may be overridden by other eggs to return other stylesheet formats; for example, [[eggdoc-svnwiki]] may return an SXML->svnwiki stylesheet. ==== HTML output API This is the underlying HTML output API used by the default {{eggdoc:transform}} transformer. Typically, it is not necessary to call these directly, although you might want to alter the HTML doctype or CSS. <procedure>(eggdoc:make-html-stylesheet DOC)</procedure> Returns the default SXML to HTML stylesheet. <procedure>(eggdoc->html/really DOC)</procedure> Transform eggdoc to HTML using {{eggdoc:make-html-stylesheet}}. This procedure ensures you will get HTML output regardless of any transformer overrides. <parameter>eggdoc:doctype</parameter> The DOCTYPE for this document, typically as defined in the doctype extension. This defaults to doctype:xhtml-1.0-strict. <parameter>eggdoc:css</parameter> CSS text inserted verbatim between the document's <style> tags. This must be <!-- wrapped in HTML comments -->. The default is quite reasonable. If you wish to source a CSS file instead of inserting the text directly, you can override the eggdoc-style tag in the default stylesheet to do so. ==== Miscellaneous API <parameter>(eggdoc:warnings BOOL)</parameter> If {{#t}}, warn on transformation errors. If {{#f}}, transformation error output is suppressed. Defaults to {{#t}}. <procedure>(eggdoc:make-defsig TAG SIG . [BODY])</procedure> Use this procedure inside a stylesheet to generate a new signature tag, just like {{procedure}} or {{macro}}. It expands to a {{(definition (signatures (signature ...)))}} expression. For example, (eggdoc->html doc `( ,@(eggdoc:make-stylesheet doc) (constant *macro* . ,eggdoc:make-defsig) (method *macro* . ,eggdoc:make-defsig) )) will create new {{constant}} and {{method}} tags. ==== Internal API This API is used by eggs such as [[eggdoc-svnwiki]] to override the default output format. <parameter>eggdoc:default-stylesheet-maker</parameter> The default stylesheet creator, invoked by {{eggdoc:make-stylesheet}}. Defaults to {{eggdoc:make-html-stylesheet}}. <parameter>eggdoc:default-transformer</parameter> The default output transformer, invoked by {{eggdoc:transform}} (and {{eggdoc->html}}). Defaults to {{eggdoc->html/really}}. <parameter>eggdoc:result</parameter> An alist containing the parse result for the last parse. The same value is returned from the eggdoc transformer, but some eggdoc scripts discard it. The only key currently defined is {{name}}, which contains the egg name as derived by {{eggdoc:derive-egg-name}}. <procedure>(eggdoc:derive-egg-name DOC)</procedure> Get egg name from DOC from the {{name}} element. Implicitly adds a {{(name NAME)}} association to {{eggdoc:results}}. === Document structure ==== Subsections Document section tags must be nested in the order {{section -> subsection -> subsubsection -> subsubsubsection}}. You may not nest section tags of the same level, as in {{(section "name" (section ...))}}, and you may not skip a level. {{eggdoc}} won't complain if you violate these rules---the HTML driver is pretty lax---but the appearance will be off and {{eggdoc-texinfo}} will fail on such a document. {{eggdoc-texinfo}} is more sensitive to malformed documents, so it is recommended to generate {{.info}} and {{.pdf}} output as well to ensure your document is correct. {{documentation}}, {{examples}}, and {{license}} are {{section}} tags in disguise. In particular, {{(documentation (section ...))}} is invalid; use {{(documentation (subsection ...)).}} === Examples Complete examples for the Chicken extensions {{args, doctype, eggdoc, hostinfo, sxml-tools, sxml-transforms,}} and {{vector-lib}} are provided in the egg under src/. === About this egg ==== Author [[http://3e8.org/|Jim Ursetto]] ==== Version history ; 1.3 : transformer override mechanism ; 1.2 : {{eggdoc:make-defsig}}; subsub[sub]section tags; with-default-param tag ; 1.1 : setup scripts adds documentation and version info [Thanks to Jim Miller] ; 1.0 : Initial release ==== Requirements * [[sxml-transforms]], [[doctype]] ==== License BSD.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 14 to 9?