1 $group
2 $
3 var sect = {
4 title: 'Ittf notation'
5 };
6 section( §)
7 p Documents are made of text lines separated by a:
8 ul
9 li x'000a' char or
10 li x'000d' char or
11 li x'000a' \b x'000d' couple of chars
12 p A line is made of a node-name and a node-value separated by a
13 \b white-char (space or tab).
14 ittf-panel
15 schema ittf
16 ittf
17 name value
18 name value
19 p Node-values always are trimmed, you cannot have a node-value
20 \b that starts or ends with a white-char sequence.
21 p When loaded, both these nodes will containg the 'value' string in the node-value.
22 ittf-panel
23 schema ittf
24 ittf
25 name1 value
26 name2 value
27 p The node hierarchy is built calculating the indentation of node-names
28 \b in a text line. Every tab or every 4 space chars preeceding a node-name
29 \b count for one level of indentation.
30 p The node-name of the first line (the root node-name) must have indentation zero.
31 \b The root node-name must start at column 1 (1-based) of the first row.
32 p An ITTF Document cannot have more than one root node. If the semantic of a
33 \b document require more than one root node, a convenience '$group'
34 \b command can be used. It must be the root node of a composed document (included
35 \b or mixed) and is ignored during the mTree build up, so that all its childs become
36 \b root nodes of the included document.
37 p Example. Ittf document with two root nodes.
38 ittf-panel
39 schema ittf
40 title Sample ITTF document with two root nodes.
41 ittf
42 ${'$'}group
43 root1 value1
44 root2 value2
45 p A line becomes a node which parent is the first preceeding line with a lesser
46 \b indentation.
47 p Phisical text lines may have line continuatios and a 'logical' line
48 \b may contain many phisical lines. There are three pre-defined
49 \b node-names that allow line continuation:
50 ul
51 li '\' means that the node-value is joined to the node-value
52 \b of the parent node without separation.
53 li '\b' means that the node-value is joined to the node-value
54 \b of the parent node with one space char separator.
55 li '\n' means that the node-value is joined to the node-value
56 \b of the parent node with one Line Feed char separator.
57 ittf-panel
58 schema ittf
59 title Line continuation sample. Both 'name1' and 'name2' have the same value.
60 ittf
61 - root
62 - name1 I am
63 - ${} a single
64 - ${} line
65 - name2 I am a single line
66 p Node names and values are text strings by design, and never require quotes
67 \b (they are unquoted by the lexer). The wizzi factory is a text manipulator.
68 \b If the semantic of a node-value require that it is treated as a different type
69 \b (boolean, integer, float or date), that can be done using wizzi schemas,
70 \b that apply types to the tree structure resulting from loading an ittf
71 \b document (see mTrees).
72 p One exception to this rule is when an argument is passed to a mixed ITTF Document,
73 \b and will become part of its evaluation context. Types different from string
74 \b can be usefull in JsWizzi expessions. The '$params' command, that
75 \b declares the parameters received by a mixed ITTF Document, may assign a type to
76 \b passed arguments.
77 p In any case the lexer do not detect types. When needed they must be declared.