summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/s-xml-analyzers.mkiv
blob: af11fc984235538f51a9e8135b759c6feaef4cb2 (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
%D \module
%D   [      file=s-xml-analyzers,
%D        version=2013.05.28,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Analyze XML Content,
%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.

\startmodule[xml-analyzers]

\registerctxluafile{s-xml-analyzers}{}

\installmodulecommandluasingle \showxmlstructure  {moduledata.xml.analyzers.structure}
\installmodulecommandluasingle \showxmlcharacters {moduledata.xml.analyzers.characters}
\installmodulecommandluasingle \showxmlentities   {moduledata.xml.analyzers.entities}

\stopmodule

\continueifinputfile{s-xml-analyzers.mkiv}

\usemodule[art-01]

\setupbodyfont[tt,10pt]

\edef\FileName{\cldcontext{resolvers.findfile("music-collection.xml")}}

\setupheadertexts[\FileName\space\emdash\space\pagenumber]

\starttext

    \showxmlcharacters[\FileName]

\stoptext