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
|
%D \module
%D [ file=x-udhr,
%D version=2011.06.11,
%D title=\CONTEXT\ Modules,
%D subtitle=Unicode Language Test Files,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D The XML files can be fetched from: \from[http://unicode.org/udhr/].
\startmodule[udhr]
\startxmlsetups udhr:basics
\xmlsetsetup {#1} {*} {udhr:*}
\stopxmlsetups
\xmlregistersetup{udhr:basics}
\startxmlsetups udhr:udhr
\mainlanguage[\xmlatt{#1}{language}]
\starttitle[title=\xmltext{#1}{/title}]
\xmlfirst{#1}{/preamble}
\xmlall{#1}{/article}
\stoptitle
\stopxmlsetups
\startxmlsetups udhr:preamble
\startsubject[title=\xmltext{#1}{/title}]
\xmlall{#1}{/*)}
\stopsubject
\stopxmlsetups
\startxmlsetups udhr:article
\startsubject[title=\xmltext{#1}{/title}]
\xmlall{#1}{/*)}
\stopsubject
\stopxmlsetups
\startxmlsetups udhr:orderedlist
\startitemize[n]
\xmlflush{#1}
\stopitemize
\stopxmlsetups
\startxmlsetups udhr:listitem
\startitem
\xmlflush{#1}
\stopitem
\stopxmlsetups
\startxmlsetups udhr:para
\xmlflush{#1}
\par
\stopxmlsetups
\setupbodyfont
[dejavu,10pt]
\setuplayout
[width-=middle,
height=middle,
footer=0cm,
header=1.5cm]
\setupwhitespace
[big]
\setuphead
[chapter]
[header=high,
style=\bfb,
align=middle]
\setuphead
[section]
[style=\bfa,
align=middle]
\setuptolerance
[verytolerant]
\continueifinputfile{x-udhr.mkiv}
% todo: when argument given then process it
\starttext
\xmlprocessfile{main}{udhr_nld.xml}{}
\stoptext
\stopmodule
|