ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mapping seeregister command to xml
@ 2019-07-04 10:10 Thomas A. Schmitz
  2019-07-04 14:36 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas A. Schmitz @ 2019-07-04 10:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: mapping seeregister command to xml
  2019-07-04 10:10 mapping seeregister command to xml Thomas A. Schmitz
@ 2019-07-04 14:36 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2019-07-04 14:36 UTC (permalink / raw)
  To: ntg-context

On 7/4/2019 12:10 PM, Thomas A. Schmitz wrote:
> Hi,
> 
> I'm having trouble mapping the seeregister command to an xml setup. 
> Example (looks somewhat messy, but explains why I need it):
i'll send you a test file off list


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2019-07-04 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 10:10 mapping seeregister command to xml Thomas A. Schmitz
2019-07-04 14:36 ` Hans Hagen

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).