[NTG-context] problem with UTF8 chars in XML elements

Pablo Rodriguez oinos at gmx.es
Sun May 5 14:58:54 CEST 2019


Dear list,

I have the following sample:

    \startbuffer[demo]
    <?xml version="1.0" encoding="UTF-8"?>
    <doc>
        <título>Title</título>
    </doc>
    \stopbuffer

    \startxmlsetups xml:sample
        \xmlsetsetup{#1}{doc|título}{xml:*}
    \stopxmlsetups

    \xmlregistersetup{xml:sample}

    \startxmlsetups xml:doc
        \xmlflush{#1}
    \stopxmlsetups

    \startxmlsetups xml:título
        \title{\xmlflush{#1}}
    \stopxmlsetups

    \starttext
         \xmlprocessbuffer{main}{demo}{}
    \stoptext

ConTeXt has problems parsing <título>. To the best of my knowledge, this
is a valid XML element name (sorry, but I don’t have a better reference:
https://en.wikipedia.org/wiki/XML#International_use]).

How can I get this parsed with ConTeXt?

Many thanks for your help,

Pablo
--
http://www.ousia.tk


More information about the ntg-context mailing list