Skip to main content

2.3. Body Structures

2.3.1. Simple Elements​

The body could simply be a single data element. For example a single text element can represent a lengthy character string.

<body> := TEXT

or

text:"this is the actual text of the body"

2.3.2. Structured Text​

The body could be thought of as paragraphs, where each paragraph is represented by a text element. The paragraphs are then the elements of a list.

<body> := LIST (<paragraph>, <paragraph>, ...)

<paragraph> := TEXT

or

list:(text:"paragraph one", text:"paragraph two", ...)

2.3.3. NLS File Example​

It is possible to represent the data from NLS files in this format. NLS is a large multipurpose system which operates on structured data files. The files are tree structured, and there is data associated with each node of the tree. There are several fields associated with each node as well.

An NLS file is:

proplist(                                                     file
name:"FILENAME", name:<file> name of file
name:"CREATION-DATE", name:<date> creation date and time
name:"VERSION", index:<version> file version number
name:"SID-COUNT", integer<count> current SID count
name:"LAST-WRITER", name:<ident> last writer of file
name:"OWNER", name:<ident> owner of file
name:"LAST-WRITE-TIME", name:<date> last write date and time
name:"LEFT-NAME-DELIM-DEFAULT", name:<c> default name
name:"RIGHT-NAME-DELIM-DEFAULT", name:<c> delimiters
name:"SUBSTRUCTURE", <nls-substructure> substructure
)endlist

An NLS substructure is:

list:(                                                substructure
<nls-node> node is defined below
.
.
.
)endlist

An NLS node is:

proplist:(                                                    node
name:"BLOCK", <nls-block> block defined below
name:"SUBSTRUCTURE", <nls-substructure> substructure
)endlist

An NLS block is:

proplist:(                                                   block
name:"LEFT-NAME-DELIM", name:<c> left name delimiter
name:"RIGHT-NAME-DELIM", name:<c> right name delimiter
name:"SID", integer:<sid> SID number
name:"CREATOR", name:<ident> statement creator
name:"CREATION-TIME", name:<date> creation date and time
name:"DATA", <data> data defined below
)endlist

NLS data is:

proplist:(                                                    data
name:"<a data name>", <type depends on data name>
. .
. .
. .
)endlist

For text, data is:

proplist:(                                                    data
name:"TEXT", text:"text of statement" text
)endlist