2.3. 本体の構造
2.3.1. 単純な要素
本体は単一のデータ要素であってもよい。例えば、単一の text 要素で長い文字列を表現できる。
<body> := TEXT
or
text:"this is the actual text of the body"
2.3.2. 構造化テキスト
本体を段落の集まりと考えることができ、各段落は text 要素で表現される。段落はそのとき、リストの要素となる。
<body> := LIST (<paragraph>, <paragraph>, ...)
<paragraph> := TEXT
or
list:(text:"paragraph one", text:"paragraph two", ...)
2.3.3. NLS ファイルの例
NLS ファイルのデータをこのフォーマットで表現することが可能である。NLS は、構造化データファイルを操作する大規模な多目的システムである。ファイルは木構造になっており、木の各ノードにデータが関連付けられている。各ノードには複数のフィールドも関連付けられている。
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
NLS 下位構造は次のとおりである。
list:( substructure
<nls-node> node is defined below
.
.
.
)endlist
NLS ノードは次のとおりである。
proplist:( node
name:"BLOCK", <nls-block> block defined below
name:"SUBSTRUCTURE", <nls-substructure> substructure
)endlist
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
NLS データは次のとおりである。
proplist:( data
name:"<a data name>", <type depends on data name>
. .
. .
. .
)endlist
テキストの場合、データは次のとおりである。
proplist:( data
name:"TEXT", text:"text of statement" text
)endlist