ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* register in xml
@ 2013-06-11 10:59 Thomas A. Schmitz
  2013-06-11 11:08 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas A. Schmitz @ 2013-06-11 10:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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}}
\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: register in xml
  2013-06-11 10:59 register in xml Thomas A. Schmitz
@ 2013-06-11 11:08 ` Wolfgang Schuster
  2013-06-11 11:11   ` Thomas A. Schmitz
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2013-06-11 11:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 11.06.2013 um 12:59 schrieb Thomas A. Schmitz <thomas.schmitz@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: register in xml
  2013-06-11 11:08 ` Wolfgang Schuster
@ 2013-06-11 11:11   ` Thomas A. Schmitz
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas A. Schmitz @ 2013-06-11 11:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 06/11/2013 01:08 PM, Wolfgang Schuster wrote:
>    \expanded{\index{…}}
>
> Wolfgang

Sigh... things can be so easy; I should have tried that myself! Thanks a 
lot, Wolfgang!

Thomas
___________________________________________________________________________________
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-11 11:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 10:59 register in xml Thomas A. Schmitz
2013-06-11 11:08 ` Wolfgang Schuster
2013-06-11 11:11   ` 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).