I changed this in the source of lxml-ini.lua (line 225). It seems the 'not' has been accidentally crept in (from copying that line in ifxmlempty, the item above?) Anyway, remade the format and now the result is as I expected it to be. See below in the output of the MWE from my first post on this subject. I added the relevant portion of the code for clarity. I am sure the next update will reflect it in the source ;-) dr. Hans van der Meer implement { name = "ifxmlselfempty", public = true, usage = "condition", arguments = "argument", actions = function(id) -- return boolean_code, not checkedempty(getid(id)) and true return boolean_code, checkedempty(getid(id)) and true end }  > On 4 Sep 2023, at 10:05, denis.maier@unibe.ch wrote: > > IDK. But why do have a setup for , which does not appear in your xml source (shouldn’t it be ?)? > > > Von: Hans van der Meer via ntg-context > > Gesendet: Sonntag, 3. September 2023 14:11 > An: NTG ConTeXt > > Cc: Hans van der Meer > > Betreff: [NTG-context] ifxmlselfempty > > Is it possible that the new \ifxmlselfempty has reversed its outcome? Or did I something wrong in this MWE? > Here an MWE. > > yours sincerely > dr. Hans van der Meer > > > > \startbuffer[test] > > > !not empty node! > > \stopbuffer > > \startxmlsetups xml:mysetups > \xmlsetsetup{\xmldocument}{something|emptynode|notemptynode}{xml:*} > \stopxmlsetups > > \xmlregistersetup{xml:mysetups} > > \startxmlsetups xml:emptynode > node=\xmltag{#1}:\crlf > ifxmlselfempty-else-fi:\space > \ifxmlselfempty{#1} > attribute = \xmlatt{#1}{value} > \else > content = \xmlflush{#1} > \fi > \crlf > ifxmlselfempty-else-fi reversed:\space > \ifxmlselfempty{#1} > content = \xmlflush{#1} > \else > attribute = \xmlatt{#1}{value} > \fi > \blank > \stopxmlsetups > > \startxmlsetups xml:notemptynode > node=\xmltag{#1}:\crlf > ifxmlselfempty-else-fi:\space > \ifxmlselfempty{#1} > attribute = \xmlatt{#1}{value} > \else > content = \xmlflush{#1} > \fi > \crlf > ifxmlselfempty-else-fi reversed:\space > \ifxmlselfempty{#1} > content = \xmlflush{#1} > \else > attribute = \xmlatt{#1}{value} > \fi > \blank > \stopxmlsetups > > \startxmlsetups xml:something > \xmlall{#1}{./emptynode}\blank > \xmlall{#1}{./notemptynode}\blank > \stopxmlsetups > > \starttext > \ConTeXt\ \contextversion\blank > \xmlprocessbuffer{main}{test}{} > \stoptext