Detailed LMNL syntax

From LMNLWiki

A document is in LMNL syntax if it satisfies the rules described in this page. A document in LMNL syntax maps to a LMNL document in a LMNL data model.

Contents

Document

Taken as a whole, a document in LMNL syntax must match the Document production.

[1] 	Document 	::= 	Prolog Content

Note that as a consequence of these productions, an empty document is in fact recognised as a document in LMNL syntax. Indeed, any text document in UTF-8 or UTF-16 that does not contain any unescaped [ or { is recognised as a document in LMNL syntax.

Character data and markup

LMNL syntax contains intermixed character data and markup.

Markup comes in two flavours: syntactic markup and semantic markup. Syntactic markup is markup that might not be passed through to an application, and consists of the LMNL declaration, namespace declarations, comments, and whitespace before the first character data or semantic markup in the document. Semantic markup must be passed through to an application, and consists o '{{#'and have tf start tags, end tags, empty tags, and atoms.

Character data is all text in the document that is not markup.

[2] 	CharData 	::= 	[^[{]*

The character data will be part of the content of a Limen in the data model.

Prolog

The prolog of a document in LMNL syntax contains an optional LMNL declaration followed by any number of namespace declarations, and comments, which may be separated with whitespace.

[3] 	Prolog 	        ::= 	LMNLDeclaration? Misc*
[4] 	Misc 	        ::= 	NSDeclaration | Comment | S

Note: Production 5 no longer exists.

[<a href="/wiki/index.php?title=Detailed_LMNL_syntax&action=edit&amp