[[User:Thomas|Thomas]] 21:38, 7 November 2010 (UTC)
== Removing unwanted strings from xml source ==
In some cases you might want to remove strings or characters from the xml source. For example ConTeXt cannot process a hashmark. The following example shows how to remove the hashmark from a xml identifier before processing with the command \cldcontext
The xml source:
<xmlcode>
<a href="#myspecialid">the previous section</a>
</xmlcode>
The setup code:
<texcode>
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{a}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:initialize}
\startxmlsetups xml:a
\cldcontext{string.sub([[\xmlatt{#1}{href}]],2)}
\stopxmlsetups
</texcode>
{{Getting started navbox}}
[[Category:XML]]