"sgmlTag"
, the S analog of an arbitrary
tag in the SGML language.
These sgmlTag objects contain a tag name (a character string),
attributes and a body.
The attributes, if not empty, is a named object with character strings
as the data elements.
The body is a list, containing further sgmlTag objects and/or plain
text.
The recursive structure of the objects means that arbitrary SGML
structure can be represented in the documentation object, allowing
transformation in either direction without loss of information.
Information about rendering the documentation objects is not (wherever possible) stored in the documentation objects themselves. Instead, a (potentially extensible) set of mapping table objects contain programmatic rendering or processing information for S computations on documentation objects, and DTD tables and other non-S mechanisms can be used to control rendering or other processing once the documentation objects have been converted to SGML.
sgmlTagToText(object, maps, level = 0)This function takes an S object, usually of class sgmlTag and a mapping table object, and returns text corresponding to the object. The function looks up the tag name of the object in a mapping table. It can find a character vector, an S function or expression, a special object of class
"sgmlMap"
, or nothing (a null object).
What happens to the object in these cases is as follows:
sgmlMap
.
sgmlMap
object itself).
general | Elements that can typically be used in any part of any document. |
---|---|
doc | Top-level sections (e.g. s-title, etc.) and basic information for a document (version, etc.) |
function | Sections and structures for a document describing an S function. |
class | Sections and structures for a document describing an S class. |
method | Sections and structures for a document describing an S method. This is a simple extension of function above. |
"general"
section are included in
"doc"
, and both these will be included in
"function"
and "class"
.
Finally, "method"
extends "function"
.
Tag Name | Found In | Section or Sub-section? |
---|---|---|
"application" | general | No |
"br" | general | No |
"code" | general | No |
"directory" | general | No |
"file" | general | No |
"p" | general | No |
"program" | general | No |
"s-arg" | function | Sub |
"s-args" | function | Yes |
"s-args-optional" | function | Yes |
"s-args-require" | function | Yes |
"s-argument" | function | No |
"s-author" | doc | Yes |
"s-background" | doc | Yes |
"s-bugs" | doc | Yes |
"s-call" | function | No |
"s-class" | general | Yes |
"s-class-slot" | class | Yes |
"s-class-title" | class | Yes |
"s-description" | doc | Yes |
"s-details" | doc | Yes |
"s-docclass" | doc | Yes |
"s-example" | doc | No |
"s-examples" | doc | Yes |
"s-expression" | general | No |
"s-extends" | class | Yes |
"s-extends-class" | class | Yes |
"s-function-name" | function | No |
"s-keywords" | doc | Yes |
"s-note" | doc | Yes |
"s-object" | general | No |
"s-prototype-element" | class | No |
"s-references" | doc | Yes |
"s-section" | doc | Yes |
"s-see" | doc | Yes |
"s-side-effects" | function | Yes |
"s-signature" | method | Yes |
"s-signature-arg" | method | Sub |
"s-slots" | class | Yes |
"s-title" | doc | Yes |
"s-topics" | doc | Yes |
"s-usage" | function | Yes |
"s-usage-expression" | function | Yes |
"s-value" | doc | Yes |
"s-warning" | doc | No |
"s-warnings" | doc | Yes |
"url" | general | No |