blob: 2554fa2d4b7a0c35a9aaa2699d8fa7c06427deba (
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
|
%D \module
%D [ file=m-chart,
%D version=1998.10.10,
%D title=\CONTEXT\ Modules,
%D subtitle=Flow Charts,
%D author={Hans Hagen \& Ton Otten},
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%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\ interface:
\unprotect
\startXMLdefinitions flowchart
\defineXMLargument [flowchartdefinition]
{\defineFLOWchart[\XMLpar{flowchartdefinition}{identifier}{unknown}]}
\defineXMLpickup [flowcell]
{\startFLOWcell
\defineXMLargument[name]{\unspaceafter\name}%
\defineXMLargument[shape]{\unspaceafter\shape}%
\defineXMLnestedargument[text]{\text}}
{\stopFLOWcell}
\defineXMLenvironment [location] % global unspace/store
{\bgroup\defineXMLpush[x]\defineXMLpush[y]}
{\XMLunspace{x}\XMLunspace{y}%
\expanded{\egroup\noexpand\location{\XMLpop{x},\XMLpop{y}}}}
\defineXMLenvironment [connection]
{\bgroup\defineXMLpush[type]\defineXMLpush[name]}%
{\XMLunspace{type}\XMLunspace{name}%
\expanded{\egroup\noexpand\connection[\XMLpop{type}]{\XMLpop{name}}}}
\defineXMLsingular [flowchart]
{\expanded{\FLOWchart[\XMLpar{flowchart}{identifier}{unknown}]}}
\defineXMLdirective [flowchart] [shapes] \setupFLOWshapes
\defineXMLdirective [flowchart] [lines] \setupFLOWlines
\stopXMLdefinitions
\protect \endinput
|