2.3. Strutture del body
2.3.1. Elementi semplici
Il body potrebbe essere semplicemente un singolo elemento di dati. Per esempio, un singolo elemento text può rappresentare una lunga stringa di caratteri.
<body> := TEXT
or
text:"this is the actual text of the body"
2.3.2. Testo strutturato
Il body potrebbe essere pensato come paragrafi, dove ogni paragrafo è rappresentato da un elemento text. I paragrafi sono allora gli elementi di una lista.
<body> := LIST (<paragraph>, <paragraph>, ...)
<paragraph> := TEXT
or
list:(text:"paragraph one", text:"paragraph two", ...)
2.3.3. Esempio di file NLS
È possibile rappresentare in questo formato i dati dei file NLS. NLS è un grande sistema multiuso che opera su file di dati strutturati. I file hanno una struttura ad albero e a ogni nodo dell'albero sono associati dei dati. A ogni nodo sono associati anche diversi campi.
Un file NLS è:
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
Una sottostruttura NLS è:
list:( substructure
<nls-node> node is defined below
.
.
.
)endlist
Un nodo NLS è:
proplist:( node
name:"BLOCK", <nls-block> block defined below
name:"SUBSTRUCTURE", <nls-substructure> substructure
)endlist
Un blocco NLS è:
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
I dati NLS sono:
proplist:( data
name:"<a data name>", <type depends on data name>
. .
. .
. .
)endlist
Per il testo, i dati sono:
proplist:( data
name:"TEXT", text:"text of statement" text
)endlist