[NTG-context] handling code in XML

Hans Hagen pragma at wxs.nl
Tue Feb 24 15:41:37 CET 2015


In a next upload you can do:

\startbuffer[demo]
<doc>
<pre>
\def\whatever#1{[whatever #1]}

\ctxlua{print("okay")}
</pre>
</doc>
\stopbuffer

\usemodule[scite] % optional

\startxmlsetups xml:initialize
     \xmlsetsetup{#1}{doc|pre}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:doc
     \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:pre
     \xmlprettyprint{#1}{tex}
\stopxmlsetups

\starttext
     \xmlprocessbuffer{main}{demo}{}
\stoptext





-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list