Am 11.06.2013 um 12:59 schrieb Thomas A. Schmitz <thomas.schm...@uni-bonn.de>:

> Hi,
> 
> may I interest you in a rerun of a question I asked half a year ago? How do 
> you do an index from xml? Here is my naive approach, which ends in all 
> entries being filed under "x," which is less than ideal. What would be the 
> proper way of doing this?
> 
> Thanks
> 
> Thomas
> 
> \starttext
> 
> \startbuffer[demo]
> <document>
>   <p>Gustave <indexterm>Flaubert, Gustave</indexterm>Flaubert.</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
>       \index{\xmlflush{#1}}

  \expanded{\index{…}}

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
___________________________________________________________________________________

Reply via email to