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

Axel Kielhorn tex at axelkielhorn.de
Sun May 5 17:25:30 CEST 2019


> Am 05.05.2019 um 14:58 schrieb Pablo Rodriguez <oinos at gmx.es>:
> 
> 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]).

I had the same problem with an „ä“ in one of my elements.

Took some time to discover that.

Axel



More information about the ntg-context mailing list