STxT: Semantic TexT
One Language, Infinite Possibilities

Documents with namespace

Everything explained for documents without namespace is applicable, except for multiline nodes.

As a previous summary:

The use of : for multiline nodes is not allowed.
This is implied by the node type.

If the character : is inserted, what will happen is that it will become part of the text, it will not be considered special. The other types of text do not allow multiple lines, so it will have no effect.

Namespace definition

A namespace is a document without namespace with the first node called Namespace, which is a structure with all possible node types, as an example.

A node is defined only once, after that it cannot be redefined.
It is allowed to appear before as long as the structure is not defined.

Let's look at an example:

Namespace: www.demo.com/documento.stxt
	Documento:
    	Title: (1)
    	Sections: (?)
    	Description: (1) TEXT
    	Document Type: (1) ENUM
    		:report
    		:article
    		:essay
		
	Sections:
    	Section: (+) TEXT

Another simpler way to define it would have been:

Namespace: www.demo.com/documento.stxt
	Documento:
    	Title: (1)
    	Sections: (?)
    		Section: (+) TEXT
    	Description: (1) TEXT
    	Document Type: (1) ENUM
    		:report
    		:article
    		:essay

Finally, a document from the namespace:

Documento (www.demo.com/documento.stxt):
    Title: First simple document
    Description:
    	This is the
    	first simple
    	document. It has several lines
    Document Type: report
    Sections:
    	Section: This is a section
    	Section:
    		This is a section
    		with more than one
    		line.

Quantity definition

It is allowed to define the quantity of nodes as follows:

Node types

The following node types are allowed: