summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/x-cals.mkiv
blob: 31ba2d213a99bca66bae0f7ad0cd14cd581c8f5f (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
%D \module
%D   [       file=x-cals,
%D        version=2007.09.05,
%D          title=\CONTEXT\ XML Modules,
%D       subtitle=Cals table renderer,
%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.

\writestatus{loading}{ConTeXt XML Macros / Cals Tables}

\startmodule [cals]

\registerctxluafile{x-cals}{}

% \startxmlsetups xml:cals:process
%     \xmlsetsetup {#1} {cals:table} {*}
% \stopxmlsetups
% \startxmlsetups cals:table
%     \ctxlua{moduledata.cals.table("#1")}
% \stopxmlsetups
% \xmlregistersetup{xml:cals:process}

\startxmlsetups xml:cals:process
%     \xmlsetfunction {\xmldocument} {cals:table} {moduledata.cals.table}
    \xmlsetfunction {#1} {cals:table} {moduledata.cals.table}
\stopxmlsetups

\startxmlsetups xml:cals:nonamespace
%     \xmlsetfunction {\xmldocument} {table} {moduledata.cals.table}
    \xmlsetfunction {#1} {table} {moduledata.cals.table}
\stopxmlsetups

\xmlregistersetup{xml:cals:process}

\xmlregisterns{cals}{cals}

%D One can register the nonamespace variant for cases where the cals
%D model is embedded in the parent DTD.

\stopmodule