1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17\writestatus{loading}{ConTeXt XML Support Goodies}
18
19\registerctxluafile{lxmlctx}{}
20
21\unprotect
22
23\settrue \xmllshowbuffertoo
24\setfalse\xmllshowtitletoo
25\settrue \xmllshowwarningtoo
26
27\definehead
28 [lshowtitle]
29 [subsubsubsubsubject]
30
31\setuphead
32 [lshowtitle]
33 [\c!style=\tta]
34
35\unexpanded\def\xmllshow#1
36 {\ctxlua{xml.ctx.tshow {
37 pattern = \!!bs\detokenize{#1}\!!es,
38 \ifconditional\xmllshowtitletoo
39 title = "lshowtitle",
40 \fi
41 \ifconditional\xmllshowwarningtoo
42 warning = true,
43 \fi
44 } }}
45
46\unexpanded\def\xmllshowbuffer#1#2#3
47 {\ctxlua{xml.ctx.tshow {
48 pattern = \!!bs\detokenize{#2}\!!es,
49 \ifconditional\xmllshowbuffertoo
50 xmlroot = "#1",
51 attribute = "#3",
52 \fi
53 \ifconditional\xmllshowwarningtoo
54 warning = true,
55 \fi
56 } }}
57
58\protect
59 |