![](https://secure.gravatar.com/avatar/d0e94fb08d4620cfbd2f8f59a7868637.jpg?s=120&d=mm&r=g)
Hi all, back with a question on index entries in xml. I have the problem that my processing command inserts empty spaces. \removeunwantedspaces does not remove the unwanted spaces; \ignorespaces removes even wanted spaces. Can anybody help? Thanks and all best Thomas \starttext \startbuffer[demo] <document> <p>Gustave <indexterm keyword="Flaubert, Gustave">Flaubert</indexterm> originated from <indexterm>Rouen</indexterm>.</p> </document> \stopbuffer \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{document|p|indexterm}{xml:*} \stopxmlsetups \xmlregistersetup{xml:test} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1} \par \stopxmlsetups \startxmlsetups xml:indexterm \doifelse{\xmlattdef{#1}{keyword}{@@@}}{@@@} {\expanded{\index{\xmlflush{#1}}}\xmlflush{#1}\removeunwantedspaces} {\expanded{\index{\xmlatt{#1}{keyword}}}\xmlflush{#1}\removeunwantedspaces} \stopxmlsetups \xmlprocessbuffer{whatever}{demo}{} \page \placeregister[index] \stoptext