Johannes Graumann wrote:
Hello,
I while ago (http://archive.contextgarden.net/message/20080214.090451.b23da5b9.en.html) I asked whether the creation of a xml mapping tag was possible using mark V. I'm about to revisit this after some long absence and would like to know whether there's anything new and nifty which might help achieving this.
Thanks for your hints,
\starttext
\startxmlsetups office
\xmlsetsetup{main}{text:p|text:span}{*}
\stopxmlsetups
\xmlregistersetup{office}
\startxmlsetups text:p
[p: \xmlflush{#1}]
\stopxmlsetups
\startxmlsetups text:span
\bgroup
\xmlfilter{main}{office:automatic-styles/style:style/style:text-properties/command(do:style:text-properties)}
[span: \xmlflush{#1}]
\egroup
\stopxmlsetups
\startxmlsetups do:style:text-properties
\xmlval{fo:font-weight}{\xmlatt{#1}{font-weight}}{}% todo:
namespaces in attributes
\stopxmlsetups
\xmlmapvalue {fo:font-weight} {bold} {\bf}
\startbuffer
<?xml version='1.0'?>
<office>
office:automatic-styles