Am 17.03.10 12:03, schrieb Hans van der Meer:
Yes, I know that and already have made a setup for common commands
like <b>=\bf, <hr/>=\hairline etc. My point however is: How to avoid
the need to rewrite in this manner all ConTeXt macros one needs?
Maybe there is a way to let ConTeXt interpret the CDATA content, at the
moment it is printed verbatim.
What you can also do is to write TeX content in a tex element and
disable xml parsing.
A better way is to minimize your markup and inlcude rules etc. in other
elements/environments (e.g. headers, descriptions ...)
\startbuffer[test]
<?xml version="1.0" encoding="UTF-8"?>
<test>
<![CDATA[
This must be {\bf bold text}.
]]>
This is <bf>bold text</bf>.
<tex>This is <bf>bold text</bf>.</tex>
</test>
\stopbuffer
\savebuffer[test][test.xml]
\startxmlsetups xml:testsetups
\xmlsetsetup{test}{test|bf|tex}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:bf
{\bf\xmlflush{#1}}
\stopxmlsetups
\startxmlsetups xml:test
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:tex
\disableXML
\xmlflush{#1}
\stopxmlsetups
\starttext
\xmlprocessfile{test}{test.xml}{}
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________