![](https://secure.gravatar.com/avatar/6114858d84b0f40cf715f12237ab67a1.jpg?s=120&d=mm&r=g)
Hi, A while ago Hans provided an example of typesetting a document from a docbook source. I'm attaching an over-simplified version of the initial module (a somewhat more complete version exists, but it still needs lots of work) and a minimum working example with XML. I'm not sure how to extend the xml parser to support typesetting from something like this: <section xml:id="_hello_world_in_c_and_context"> <title>Hello World in C and ConTeXt</title> <programlisting language="cpp" linenumbering="unnumbered">#include <stdio.h> int main() { printf("Hello, World!\n"); return 0; }</programlisting> <programlisting language="context" linenumbering="numbered">\starttext Hello world! \stoptext</programlisting> </section> Maybe using the vim module would be the right approach here (since the built-in parser only has support for a limited set of languages), but I'm not exactly sure about the implementation to achieve that goal. I started with \startxmlsetups xml:programlisting \dontleavehmode \startframedtext[background=color,backgroundcolor=lightgray] \obeylines \tt \xmlflush{#1} \stopframedtext \stopxmlsetups but something more is needed to properly handle new lines and to properly pass the text to vim, for example. Any hints welcome. Thank you, Mojca