Hi,

I'm having trouble mapping the seeregister command to an xml setup. Example (looks somewhat messy, but explains why I need it):

\startbuffer[test]
<document>
<p>This is a test. <emph>IGRR</emph> 4, 988<seeinscription sort="IGRR4+988" target="TAM 2 677"><emph>IGRR</emph> 4+988</seeinscription> = <emph>TAM</emph> 2, 677<inscription sort="TAM2+677"><emph>TAM</emph> 2+677</inscription></p>
</document>
\stopbuffer

\startxmlsetups xml:testsetups
        \xmlsetsetup{#1}{*}{-}
        
\xmlsetsetup{#1}{document|p|inscription|seeinscription|emph|index}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:document
        \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:p
        \xmlflush{#1} \par
\stopxmlsetups

\startxmlsetups xml:emph
        {\em \xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:inscription
        \expanded{\inscription[\xmlatt{#1}{sort}]{\xmlflush{#1}}}
\stopxmlsetups

\startxmlsetups xml:seeinscription
        
\expanded{\seeinscription[\xmlatt{#1}{sort}]{\xmlflush{#1}}{\xmlatt{#1}{target}}}
\stopxmlsetups

\defineregister[inscription][inscriptions]

\setupregister[inscription][pagestyle=,
                        textstyle=,
                        location=right,
                        prefix=none,
                        indicator=no]

\starttext
        \xmlprocessbuffer{main}{test}{}
        \blank [line]
        \placeregister[inscription]
\stoptext

Maybe my problem is with expansion in index entries? I must admit that I haven't really grasped why the \expanded was necessary and what it does...

All best

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to