Am 14.08.2025 um 22:25 schrieb Thomas A. Schmitz:
On 8/14/25 18:57, Hans Hagen wrote:

^^^ you stop something you don't start .. check the symmetry of start stop

You are of course right - but that was just sloppy cut and paste. In this minimal example, I hope that all start ... stops are properly set, and yet I get the same error:

\startbuffer[test]
<document>
   <p>Hello world</p>
</document>
\stopbuffer

\startsetups my:test
\startxmlsetups xml:testsetups
     \xmlsetsetup{#1}{document|p}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

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

\startxmlsetups xml:p
     \color [red] {\xmlflush{#1}}
\stopxmlsetups
\stopsetups

\starttext
     \setups {my:test}
     \xmlprocessbuffer{main}{test}{}
\stoptext

If I comment out the \startsetups \stopsetups lines, the file compiles. I must be missing something obvious here, sorry...

1. You have to replace

  \startsetups my:test
    ...
  \stopsetups

with

  \startrawsetups my:test
    ...
  \stoprawsetups

or put the setups name in a pair of brackets

  \startsetups [my:test]

  \startxmlsetups [xml:testsetups]
    ...
  \stopxmlsetups

  \stopsetups


2. You have to double the hash sign for the inner setups blocks when you nest them

  \startxmlsetups xml:p
    \color [red] {\xmlflush{##1}}
  \stopxmlsetups


Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to