summaryrefslogtreecommitdiff
path: root/tex/context/base/x-sch-01.mkii
blob: 5bdf088fe719f23e9e1b7f920ec247250ac3d1a6 (plain)
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
%D \module
%D   [      file=x-sch-01,
%D        version=2001.10.04,
%D          title=\CONTEXT\ Style File,
%D       subtitle=XML Schema Presentation,
%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 This style wraps around the core schema visualizer, 
%D implemented in \type {x-sch-00}. This is an experimental 
%D style, more will follow. 
%D 
%D \starttyping 
%D texexec --use=sch-01 x-fig-00.xsd --pdf
%D \stoptyping 

\doifnothing  {\jobfilename}        {\end} 
\doiffileelse {\jobfilename.xsd} {} {\end} 

\usemodule[sch-00,con-01] 

\remapXMLnamespace [xs] [xsd]

\setuplayout
  [backspace=1.5cm,
   topspace=1.5cm,
   bottomspace=1cm,
   width=middle,
   height=middle,
   header=1.5cm,
   footer=1.5cm]

\setupcolors
  [state=start]

\setupbackgrounds
  [page]
  [background=goback]

\setupbackgrounds
  [text]
  [background=gonext]

\defineoverlay
  [goback]
  [\overlaybutton{PreviousJump}]

\defineoverlay
  [gonext]
  [\overlaybutton{nextpage}]

\setuppagenumbering
  [location=footer]

\usetypescript
  [palatino]
  [\defaultencoding]

\setupbodyfont
  [palatino,10pt]

%\setupinteraction
%  [state=start,
%   color=,
%   contrastcolor=,
%   style=]

\setuplist    
  [xsd:names]
  [interaction=all,
   width=0pt,
   alternative=c]

\setupregister
  [xsd:index]
  [interaction=text,
   symbol=none]

\setuphead
  [chapter]
  [style=\bfd,
   header=high]

\setuphead
  [section]
  [style=\bfb]

\lowercasestring \jobfilename \to \lcjobfilename

\setupheadertexts
  [\lcjobfilename]

\starttext

\title{Schema \quote{\lcjobfilename.xsd}}

\subject{Names in order of definition}

\startcolumns[n=3]
  \placelist[xsd:names][criterium=current]
\stopcolumns

\subject{Names in alphabetic order}

\startcolumns[n=3]
  \placeregister[xsd:index][criterium=current]
\stopcolumns

\subject{Meaning of background colors}

\placeXSDlegenda 
 
\subject{Schema components}

\processXMLfilegrouped{\jobfilename.xsd}

\stoptext