On 9/11/2015 4:21 PM, Toby Miller wrote:
I'm using ConTeXt's export to XML feature, but I'd like more control
over the XML output. Is there a way to define a TeX command that will
output a specific tag (<tag>content</tag>) around some text in the output?

\setupbackend[export=yes]

\definehighlight[this]

\starttext
    \startelement[what]
         \this{that}  \input ward
    \stopelement
\stoptext

(there are also ways to add extra properties)

Ideally I'd like to write a completely custom XML printer; it would be
very simple, but would allow me to define what tags I want for different
things. Is there a way to change the behaviour of the existing one, or
could you recommend a starting point for writing a new one?

the export resembles the structure used in the source and making each aspect configurable not only adds much overhead but is also kind of useless as one can easily transform xml into other xml; it's no problem to add a few more details here or there , but th emain indea behind the export is to have standardized and predictable output that then can be either rendered using css or converted (for that the raw file is best).

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to