Hi, I tried to get the following example with ConTeXt's old XML macros in MkII with the new setup mechanism from MkIV. \defineXMLenvironment [section] {Section:\par} {} \defineXMLenvironment [p] \par \par \startbuffer <section> <p>text text</p> <section> <p>text text</p> </section> <p>text text</p> </section> \stopbuffer \starttext \processXMLbuffer \stoptext My code for MkIV looks like: \startxmlsetups xml:mysetups \xmlsetsetup{\xmldocument}{section}{xml:section} \xmlsetsetup{\xmldocument}{p}{xml:paragraph} \stopxmlsetups \xmlregistersetup{xml:mysetups} \startxmlsetups xml:paragraph \xmlflush{#1}\par \stopxmlsetups \startxmlsetups xml:section Section:\par \xmlflush{#1} \stopxmlsetups \startbuffer[section] <section> <p>text text</p> <section> <p>text text</p> </section> <p>text text</p> </section> \stopbuffer \starttext \xmlprocessbuffer{main}{section}{} \stoptext What I want is to insert or execute a macro at the begin of every new section environment (I used the text "Section:") and this work fine with XML definition but not with setups, only the first envionment is executed and the rest is only read and flushed. Wolfgang