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
Am 11.06.2013 um 12:59 schrieb Thomas A. Schmitz
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
participants (2)
-
Thomas A. Schmitz
-
Wolfgang Schuster