Ok, I've found it. The problem is that I have something in the xml file that
produces spurios spaces, which I try to get rid of with \removeunwantedspaces.
However, this seems to have an effect on the wanted \qquad.
Is there a way to remove unwanted spaces inside a given element without
affecting earlier spaces (in other elements) that should appear?
I guess \xmlstrip could be a solution to this problem, but I don't quite
understand how this works.
Best,
Denis
%%%%%%%%%%%%% Updated Example %%%%%%%%%%%%%%%%%
\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{index|index-entry|num}{xml:*}
\stopxmlsetups
\xmlregisterdocumentsetup{test}{xml:test}
\startxmlsetups xml:index
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:index-entry
\startparagraph
\xmlfilter{#1}{/term/command(xml:term)}\qquad\qquad\qquad\xmlfilter{#1}{/loc/command(xml:loc)}
\stopparagraph
\stopxmlsetups
\startxmlsetups xml:term
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:loc
\removeunwantedspaces
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:num
\xmlflush{#1}
\stopxmlsetups
\startbuffer[test]
<?xml version="1.0" encoding="UTF-8"?>
<index>
<index-entry>
<term>asdf</term>
<loc>
<num>1</num>
</loc>
</index-entry>
</index>
\stopbuffer
\starttext
\xmlprocessbuffer{test}{test}{}
\stoptext
___________________________________________________________________________________
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
___________________________________________________________________________________