* spaces in xml index
@ 2013-06-26 7:13 Thomas A. Schmitz
2013-06-26 12:51 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Thomas A. Schmitz @ 2013-06-26 7:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: spaces in xml index
2013-06-26 7:13 spaces in xml index Thomas A. Schmitz
@ 2013-06-26 12:51 ` Wolfgang Schuster
2013-06-26 13:39 ` Thomas A. Schmitz
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2013-06-26 12:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.06.2013 um 09:13 schrieb Thomas A. Schmitz <thomas.schmitz@uni-bonn.de>:
> 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}
There is a space at the end of this line, remove it and it will also disappear from the output.
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-26 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26 7:13 spaces in xml index Thomas A. Schmitz
2013-06-26 12:51 ` Wolfgang Schuster
2013-06-26 13:39 ` Thomas A. Schmitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).