-
Notifications
You must be signed in to change notification settings - Fork 0
/
features.en.yhtml2
1098 lines (831 loc) · 31.1 KB
/
features.en.yhtml2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
include homepage.en.yhtml2
page "The Features" {
h2 id=text > Text
p >>
To output text nodes (¬http://www.w3.org/TR/2008/REC-xml-20081126/#syntax character data¬),
write literals. There are integer literals, floating point literals and text literals.
>>
p >>
Literals are written
¬http://docs.python.org/reference/lexical_analysis.html#id7 like in Python¬,
that means, text literals are in single or double quotes, or multiline
in triple double quotes:
>>
Code ||
"text" 'also text' """some more text"""
42 "an integer and" 42.23 "a floating point literal"
||
p >>
Literals are being output by the ¬#textfunction text function¬.
>>
h2 id=functioncalls > Function Calls
p >>
The main idea of YML scripts is calling functions which then generate
XML tags (¬http://www.w3.org/TR/2008/REC-xml-20081126/#syntax Markup¬).
Functions are generating single tags, lists or trees of tags.
>>
p >>
To call a function, write the name of the function, followed by a comma separated list
of function parameters (C like syntax) or just «attribute=value» pairs. Unlike C, you don't
need to insert the parameter list into parentheses. A simple function call can be terminated
by a semicolon «;» or by a period «.»
>>
p >>
It does not matter, if you're calling your function using parentheses or brackets or without.
So these statements are equal:
>>
Code ||
foo "hello, world";
foo "hello, world".
foo("hello, world");
foo["hello, world"];
||
h3 id=subtree > Subtrees
p >>
If you omit the tailing semicolon, you're creating a Subtree; YML Subtrees can also be
opened and closed with braces:
>>
Code ||
foo {
bar {
something;
}
}
||
p > If a Subtree only consists of one single subelement, then you may omit the braces:
Code ||
foo
bar;
||
h3 id=named > Named Parameters
p >>
To generate ¬http://www.w3.org/TR/2008/REC-xml-20081126/#attdecls attributes¬ by calling
a function, you can use Named Parameters.
>>
p >>
For that case, assign literals or symbols to attribute names like the following.
The name of the parameter then will be used as the name of the generated attribute.
An example:
>>
Code ||
div id=sample {
"this is a " a href="#sample" "link sample"
}
||
p > This generates:
Code | <div id="sample">this is a <a href="#sample">link sample</a></div>
h3 > Unnamed Parameters
p >>
Unnamed Parameters prepare values for predefined attributes. The following example is
equivalent to the sample above:
>>
Code ||
decl a(href);
decl div(id);
div "sample" {
"this is a " a "#sample" "link sample"
}
||
p > If no predefined attribute can be allocated, the value of the parameter is added to the body.
h3 > Calling with &
p >>
Especially if you have a ¬#defaultbody default body¬ for your function, calling with
a leading «&» can be sensible: then the tag itself is omitted and only the body is being output:
>>
Code ||
decl something { tag1; tag2; };
list {
&something;
}
||
p > results in:
Code ||
<list>
<tag1/>
<tag2/>
</list>
||
p >>
This has the same result as ¬#alias aliasing¬ «something» to «-».
>>
h3 id=funclist > Function Lists
p >>
Function Lists are a feature of YML to simulate a more C like syntax. Let's have some
examples. You can have a list of functions whereever you can have a function. Function
Lists are comma separated:
>>
Code ||
x i, j, k
||
p > compiles to:
Code ||
<x>
<i/>
<j/>
<k/>
</x>
||
h3 id=paramlists > Parameter Lists
p >>
A sample together with ¬#descending Descending Attributes¬:
>>
Code ||
decl Interface @name;
decl attr @type @name;
decl func @type @name;
Interface Icecream {
attr color flavour;
attr long number;
func int getPrice();
func void addFlavour(in color flavour, in long number);
}
||
p > compiles to:
Code ||
<Interface name="Icecream">
<attr type="color" name="flavour"/>
<attr type="long" name="number"/>
<func type="int" name="getPrice"/>
<func type="void" name="addFlavour">
<parm>
<in/>
<color/>
<flavour/>
</parm>
<parm>
<in/>
<long/>
<number/>
</parm>
</func>
</Interface>
||
p >>
Note the «parm» tags – they're generated by default, if you write a Parameter List
behind a Function Call. That differs from calling the function with parameters –
¬#functioncalls calling¬ means using ¬#text text¬ values.
>>
p >>
The «parm» tags are emitted, because the «_parm» function is called each time
such a parameter will be emitted.
>>
p >>
If you want to have the «_parm» function doing other things, just ¬#decl declare¬
it in another way.
>>
h3 id=generics > Generic Declarations
p >>
Using Generic Declarations is just like using ¬#paramlists Parameter Lists¬ – use angle brackets
instead of parentheses. For Generic Declarations, the «_generic» function is called each
time such a Generic Declaration will be emitted, generating «generic» tags as the default:
>>
Code | max<int>(x, y)
p > compiles to:
Code ||
<max>
<generic>
<int/>
</generic>
<parm>
<x/>
</parm>
<parm>
<y/>
</parm>
</max>
||
h3 id=contentfc > The «content» function
p >>
The «content;» Function Call has a special meaning (only in a ¬#defaultbody default body¬):
it does not generate a tag, but instead
the tags of a supplied body in a call will be inserted at each place where the «content;»
function call is existing in the ¬#defaultbody default body¬.
>>
h3 id=textfunction > The «text» function
p >>
There is a special YML function named «text». Usually, it's just ¬#alias aliased¬ to «-» (and
therefore outputting nothing). The «text» function is called each time a text literal will be
output.
>>
p >>
If you ¬#decl declare¬ the «text» function, you can overload that behaviour. For example,
¬yslt YSLT¬ is declaring «text» like this:
>>
Code ||
decl text alias xsl:text;
"test"
||
p > generates:
Code | <xsl:text>test</xsl:text>
p >>
The «text» function is not called, if you give text as a value for an attribute:
>>
Code ||
decl text alias xsl:text;
a "test"
||
p > generates:
Code | <a>test</a>
p >>
But it is called using the quoting operators:
>>
Code ||
decl text alias xsl:text;
a > test
||
p > generates:
Code | <a><xsl:text>test</xsl:text></a>
h3 id=declfunction > The «decl», «define» and «operator» functions
p >>
The «decl», «define» and «operator» functions are not defined, so they cannot be used
accidentally by having a syntax error i.e. in a «decl» statement. If you want to use such
a function, i.e. «decl()», you have to ¬#decl declare it explicitely¬:
>>
Code ||
decl decl;
decl();
||
p > will result in:
Code | <decl/>
h2 id=decl > Declaring Functions: decl
p >>
As default, each Function Call generates one XML tag, which has the same name. To be exact,
the XML tag has dashes in it's name where the YML function has underscores.
>>
p >>
To define, how tags and attributes look like, which are created by a Function Call, you
can use the «decl» statement.
>>
h3 > Trivial Declarations
p > In a trivial declaration, you're just declaring the Function Name and so the XML tag name:
Code | decl html, head, title, body, p, a;
p > As seen in the example, multiple declarations can be done in a comma separated list.
p >>
Because trivial declarations are done automatically, if you're using a function for the
first time, you usually don't need to declare this way.
>>
h3 > Specifying Unnamed Parameters
p >>
To specifiy Unnamed Parameters, give the parameter list comma separated in parentheses
or provide one or more brackets with parameter lists in them:
>>
Code | decl a(href), img[src];
p >>
If you're using the corresponding functions a() and img() together with an unnamed parameter
in a call, then these attributes are used for applying the values, respectively:
>>
Code | a "http://www.ccc.de" "The Club Homepage" img "logo.png";
p > These Function Calls generate:
Code | <a href="http://www.ccc.de">The Club Homepage</a><img src="logo.png"/>
h3 id=defaultattr > Giving Default Values for parameters
p >>
To give default values for generating XML attributes, assign a literal to each named parameter
in the declaration parentheses or brackets. Two examples, which do the same:
>>
Code
||
decl img(src, alt="picture");
decl img[src][alt="picture"];
||
h3 id=alias > Aliasing: using different YML functions for the same XML tag for different tasks
p >>
Sometimes tags are used in different ways to do different things. For this case, you can
use aliasing. Aliasing means, the YML function name and the XML tag name differ. For example:
>>
Code | decl a(href), target(name) alias a;
p > Both defined YML functions then generate «<a />» tags – but the Unnamed Parameter differs.
p >>
The alias name «-» has a special meaning: it omits the tag in the output. That is especially
sensible if you have a ¬#defaultbody default body¬. Then an alias to «-» has the same meaning
as starting the function call with the «&» character: only the body is emitted.
>>
h3 id=descending > Specifying Descending Attributes
p >>
Maybe you want to write something like this:
>>
Code ||
Module ERP {
Interface Customer {
// ...
}
}
||
p > Without any extras, this compiles to:
Code ||
<Module>
<ERP>
<Interface>
<Customer />
</Interface>
</ERP>
</Module>
||
p >>
For this case, it would be practical, if «ERP» would not be interpreted as extra tag
but as value for an attribute «name». This you can achive with Descending Attributes:
>>
Code | decl Module @name, Interface @name;
p > With this declaration, the code sample above is compiling to:
Code ||
<Module name="ERP">
<Interface name="Customer" />
</Module>
||
p >>
Descending attributes can also be used this way:
>>
Code ||
decl module +name;
decl element +name;
module Some {
element {
one;
two;
three;
}
element {
four; five; six
}
}
||
p >>
The above generates:
>>
Code ||
<?xml version='1.0' encoding='UTF-8'?>
<module name="Some">
<element name="one"/>
<element name="two"/>
<element name="three"/>
<element name="four"/>
<element name="five"/>
<element name="six"/>
</module>
||
h3 id=descending_pointer > Specifying Descending Pointers
p >>
Like with descending attributes, you can use descending ¬#pointer pointers¬. Instead of preceding the
name of an attribute with a «+» sign (like with ¬#descending descending attributes¬), precede it with an asterisk «*».
>>
p >>
Like with ¬#pointer pointers¬ in general, it's a good idea to combine that with a ¬#defaultbody default body¬:
>>
Code ||
decl f *p { some tags with *p };
f value;
||
p >>
This generates:
>>
Code ||
<?xml version='1.0' encoding='UTF-8'?>
<f>
<some>
<tags>
<with>value</with>
</tags>
</some>
</f>
||
h3 id=defaultbody > Supplying a Default Body
p >>
Additionally, you can supply a Default Body for each tag. For that case, add a YML function
block in braces to your declaration:
>>
Code ||
decl pageContent alias body {
a name=top;
include heading.en.yhtml2;
div id=entries
content;
};
||
p > The sample above is used for generating this homepage, for example.
p > See the ¬#contentfc content function¬.
h3 id=inheritance > Inheritance
p >>
Declarations can ¬http://en.wikipedia.org/wiki/Inheritance_(computer_science) inherit¬
information from previous declarations. For that case, there is the
possibility to use an «is» clause to give a function name to inherit from.
>>
p > The following is an example from the YSLT specification:
Code ||
decl stylesheet(version="1.0", xmlns:xsl="http://www.w3.org/1999/XSL/Transform");
decl estylesheet is stylesheet (
xmlns:exsl='http://exslt.org/common',
xmlns:math='http://exslt.org/math',
xmlns:func='http://exslt.org/functions',
xmlns:str='http://exslt.org/strings',
xmlns:dyn='http://exslt.org/dynamic',
xmlns:set='http://exslt.org/sets',
extension-element-prefixes='exsl func str dyn set math'
);
decl textstylesheet is estylesheet {
output "text";
const "space", !"'" + " " * 200 + "'"!;
param "autoindent", 4;
content;
}, tstylesheet is textstylesheet;
||
p >>
Here «estylesheet» inherits the tag name and the Default Values from «stylesheet»,
while «textstylesheet» inherits all from «estylesheet» again. «estylesheet» then adds
a Default Body, and «tstylesheet» does exactly the same as «textstylesheet».
>>
p > All of these YML functions output «stylesheet» XML tags, but with different defaults.
h3 id=shapes > Shapes
p >>
Shapes are comparable to ¬#inheritance inheritance¬. Declaring a shape inherits
every property beside the name.
>>
Code ||
decl coords(x=0, y=0);
decl point <coords> (name);
point "origin";
||
p > compiles to:
Code | <point y="0" x="0" name="origin"/>
p >>
It's possible to have more than one shape, too. Multiple shapes
are patching each other in the sequence they're listed:
>>
Code ||
decl coords(x=0, y=0);
decl named +name;
decl point <coords, named>;
point origin;
||
p > compiles to:
Code | <point y="0" x="0" name="origin" />
h3 > Namespaces
p >>
¬http://www.w3.org/TR/xml-names/ XML namespaces¬ can be used just by providing an
«alias» clause. Additionally, they can be used by an «in» clause; these two lines
are equivalent:
>>
Code ||
decl apply(select) alias xsl:apply-templates;
in xsl decl apply(select) alias apply-templates;
||
p > «in» clauses also can be used with a block of declarations in braces:
Code ||
in xsl {
decl template(match);
decl apply(select) alias apply-templates;
decl function(name) alias template;
decl call(name) alias call-template;
}
||
h3 id=pointer > Pointers
p >>
In some situations, it is good to have information in a Function Call, which then
changes the way XML tags are generated. For this case, there are Pointers.
>>
p >>
The name should not mislead you; I took it because I chose the «*» symbol to declare them,
and that is the meaning of this symbol in the programming language C. The concept behind
is very easy.
>>
p >>
For example, it could be a good idea to generate a small HTML document containing some
content. For this case, the title of the page is a good case for using pointers:
>>
Code ||
decl page(*title) alias html {
head {
title *title;
}
body {
h1 *title;
content;
}
};
||
p >>
In the example above, calling «page('My Page') { p 'hello, world'; }» will result in
this XML output:
>>
Code ||
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>My Page</h1>
<p>hello, world</p>
</body>
</html>
||
p >>
Pointers can be referenced in any place in the Default Body of a «decl» statement, also for
generating extra tags. Then the value for a Pointer will be the tag name.
>>
p >>
Additionally, you can insert the value of a pointer as text by calling it with two leading
asterisks, i.e. if the pointer is defined as «*x», you can insert its value as text using: «**x».
>>
h4 id=pwt > Pointers without tags
p >>
To give a literal a name, you can define pointers to literals.
>>
Code ||
define *answer = 42;
something *answer;
||
p > will compile to:
Code | <something>42</something>
p >>
The «define» keyword as well as the asterisk «*» can be omitted. So this is
equivalent to the statements above:
>>
Code ||
answer = 42;
something *answer;
||
h4 > The pointer *_debug_trace
p >>
If you're calling ¬toolchain#processor yml2proc¬ with ¬toolchain#debug --debug¬, then this pointer is filled
with tracing info text, otherwise it's an empty string.
>>
h3 id=macros, "Macros";
p >>
Macros are a way to generate values for attributes with variable content. Macros can be set
like any other parameters; they're used for a text search & replace in the values of attributes
when attributes are generated.
>>
p >>
Parameters, which represent macros, are determined with a preceding «%» sign. They're
accounted for before any other parameter is accounted for in a function call, even if
they were defined after other parameters.
>>
p > An example:
Code ||
decl foo(%macro, myAttr="something %macro for testing");
testing
foo "nice";
||
p > This generates:
Code ||
<testing>
<foo myAttr="something nice for testing"/>
</testing>
||
h3 id=nullfunction > The Null Function
p >>
The function with the name «_» (underscore) is called Null Function. If you define this
function, then you're switching off the default behaviour, that trivial declares are done
automatically.
>>
p >>
Instead, unknown functions now call the Null Function. This can be very sensible together
with ¬#descending Descending Attributes¬:
>>
Code ||
decl _ +type +name alias func;
decl interface +name;
interface Testcase {
void f(in string input);
long getOptions();
}
||
p > compiles to:
Code ||
<interface name="Testcase">
<func type="void" name="f">
<parm>
<in/>
<string/>
<input/>
</parm>
</func>
<func type="long" name="getOptions"/>
</interface>
||
h2 id=quoting > Quoting Operators
p > Five different quoting operators implement different functionality:
h3 id=quote > Quote >
p > The «>» operator quotes into text nodes, doing XML escaping of text. An example:
Code | > this text will be put into a text node and these angle brackets <> will be quoted
p > Additionally, it can be used to implement an indention system, see ¬yslt YSLT¬ below.
p >>
Then an integer literal can be the first part of the operator; it gives the indention
level. For example:
>>
Code ||
0> this text is indented to the actual level and then output,
> followed by this text.\\n
1> this text is indented one indention level\\n
2> two levels\\n
1> one level again\\n
||
p >>
Quote text is being output by the ¬#textfunction «text» function¬.
>>
h3 id=blockquote > Block Quote >>
p {
> To include more lines of text into a single quoted area, use double «>>». The lines
> are concatenated together then. An example:
}
Code ||
p >>
This generates a text paragraph for HTML. All this text, which you can find in
these lines, is being concatenated together to one single text node, and then put
into the body of the <p> ... </p> tag.
>>
||
p >>
Block quote text is being output by the ¬#textfunction «text» function¬.
>>
h3 > Line Quote |
p > The «|» operator does the same as the «>» operator, adding a newline character to the text node.
p > Additionally, it can be used to implement an indention system, see ¬yslt YSLT¬ below.
p > Then it's used together with additional «>» symbols showing the grade of indention:
Code ||
| not indented
|> single indent
|>> double indent
(...)
||
p >>
Line quote text is being output by the ¬#textfunction «text» function¬.
>>
h3 > Block Line Quote ||
p >>
The «||» operator opens and closes a block of lines, which then are handled like if each of
them would be preceeded with a Line Operator «|».
>>
p > Sample:
Code {
| ||
||
this is code being quoted through
this is the second line
||
| ||
}
p > is equivalent to:
Code {
||
| this is code being quoted through
| this is the second line
||
}
p >>
Block line quote text is being output by the ¬#textfunction «text» function¬.
>>
h3 > Inserting Commands
p >>
Just like with a ¬http://en.wikipedia.org/wiki/Shell_(computing)#Unix_shells Unix shell¬,
you can insert statements into text by using backticks:
>>
Code ] | Click `a href="http://fdik.org/yml/" "this link"`, please!
p {
>>
Being in a Block Line Quote «||», you additionally can use the Line Command operator
(two backquotes,
>>
] ``).
}
p > This is very interesting to have in YSLT, for example:
Code {
| ||
| some code
] ``
> apply "myTemplate";\n
| some other code
| ||
}
h3 id=userop > User defined in-text Operators
p > You can define short cuts for inserting commands into text by defining operators.
p >>
Therefore, you need a ¬http://en.wikipedia.org/wiki/Regular_expression regular expression¬
for matching text and YML text for replacing with. Here an example, how this is used by YSLT:
>>
Code ] define operator "«(.*?)»" as value "%1";
p > The RegEx have ¬http://docs.python.org/library/re.html Python syntax¬.
p >>
In this example all matches to the RegEx will be replaced by the YML text in the «as» clause.
The text of the first group in the RegEx will replace the «%1» in the resulting YML text. You
can do that for more than one group – just use «%2» for the second group, «%3» for the third
one and so on.
>>
p > The «define» keyword can be omitted.
h3 id=quotethrough > Quote Through ]
p >>
The ¬http://en.wikipedia.org/wiki/Apple_II_series Apple ][¬ prompt operator just quotes
through directly into XML what it gets.
>>
p >>
If the first character of a command is a «<», then quote through is applied
automatically.
>>
p > This is the preferred way to output XML tags directly in YML:
Code ||
<output me="directly" />
] <!--
] add some comment, which then appears in XML
] -->
||
h2 id=including > Including YML files
p >>
You can include a second YML script file into an existing YML script file
at any place using one of the following:
>>
Code ||
include something.yml2
include "something else.yml2"
include 'anything addionally.yml2'
||
a name="ymlpath";
p >>
If you're not starting the filename with '.' or '/' as in the example above, then
if the «YML_PATH» environment variable is set to a colon separated list of directories,
these directories are being searched for the given filename. Otherwise, the local
directory is searched.
The system location for «.yml2» and «.ysl2» files is always searched afterwards.
>>
p >>
Filename ¬http://en.wikipedia.org/wiki/Glob_(programming) globbing¬ using «*» and «?»
placeholders is supported to include more than one file at a time:
>>
Code | include part*.yml2
p >>
Filename globbing also can be used reverted; that means, the files are included in reverse
order:
>>
Code | include reverse part*.yml2
p > If there are the files part1.yml2, part2.yml2 and part3.yml2, part3.yml2 is included first now.
p > To include plain text as text nodes, you can use:
Code | include text some.txt