On Tue, Mar 18, 2003 at 09:08:33AM +0100, Hans Hagen wrote:
At 08:27 PM 3/17/2003 +0100, you wrote:
In XML documents this may occur:
<varlistentry> <term>sarge <indexterm significance="normal"> <primary>sarge</primary> </indexterm> </term> <listitem> <para>De groene soldaat</para> </listitem> </varlistentry>
Is it a fundamental problem to enable this in Context? If so I must find other solutions.
\defineXMLenvironmentsave[indexterm][significance=] {\bgroup \defineXMLsave[primary]} {\expanded{\index{\XMLflush{primary}}}% \egroup}
The term element is saved in \XMLDBterm, complete with embedded indexterm, and then used as: \startvariable{\XMLDBterm}, so the above \index command would still be in the term of the definitionlist. I now save the indexterm element when \XMLDBterm is expanded, and process it after \startvariable. However, \XMLDBterm may contain more than one indexterm element (not likely, but it can), so I would need to save a stack of them to cater for that possibility. Of course I could also expand the term element and save the expanded value in \XMLDBterm, but that has its own risks. Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl