diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv new file mode 100644 index 00000000000..6691e36bbe7 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv @@ -0,0 +1,58 @@ +%D \module +%D [ file=lxml-ctx, +%D version=2007.08.17, +%D title=\CONTEXT\ \XML\ Support, +%D subtitle=Initialization, +%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 Experimental. This might change! Also, it might become a module +%D instead if core code. + +\writestatus{loading}{ConTeXt XML Support / Goodies} + +\registerctxluafile{lxml-ctx}{1.001} + +\unprotect + +\settrue \xmllshowbuffer +\setfalse\xmllshowtitle +\settrue \xmllshowwarning + +\definehead + [lshowtitle] + [subsubsubsubsubject] + +\setuphead + [lshowtitle] + [\c!style=\tta] + +\unexpanded\def\xmllshow#1% + {\ctxlua{xml.ctx.tshow { + pattern = \!!bs\detokenize{#1}\!!es, + \ifconditional\xmllshowtitle + title = "lshowtitle", + \fi + \ifconditional\xmllshowwarning + warning = true, + \fi + } }} + +\unexpanded\def\xmllshowbuffer#1#2#3% + {\ctxlua{xml.ctx.tshow { + pattern = \!!bs\detokenize{#2}\!!es, + \ifconditional\xmllshowbuffer + xmlroot = "#1", + attribute = "#3", + \fi + \ifconditional\xmllshowwarning + warning = true, + \fi + } }} + +\protect |