[NTG-context] \startXML vs \startPARSEDXML

Pablo Rodriguez oinos at gmx.es
Wed May 11 18:19:15 CEST 2022


On 5/11/22 11:47, Denis Maier via ntg-context wrote:
> Hi everyone,
>
> the wikipage on \starttyping
> (https://wiki.contextgarden.net/Command/_starttyping
> <https://wiki.contextgarden.net/Command/_starttyping>) says there are
> some dedicated commands, e.g. \startXML and \startPARSEDXML. How do they
> differ?

Hi Denis,

yesterday I had to start using xml instead of parsed-xml.

See the difference:

  \setuppapersize[A4, landscape]
  \setupbodyfont[dejavu]
  \starttext
  \startxtable[option=stretch]
  \startxrow[offset=1ex]
  \startxcell
  \startXML
  <?xml version="1.0" encoding="UTF-8"?>
  <xml>
   <documento xml:lang="es">
    <sección id="sect">
     <título>Anuncio</título>
     <p xml:lang="grc">καλά</p>
     <p class="traducción">Belleza</p>
    </sección>
   </documento>
  </xml>
  \stopXML
  \stopxcell
  \startxcell
  \startPARSEDXML
  <?xml version="1.0" encoding="UTF-8"?>
  <xml>
   <documento xml:lang="es">
    <sección id="sect">
     <título>Anuncio</título>
     <p xml:lang="grc">καλά</p>
     <p class="traducción">Belleza</p>
    </sección>
   </documento>
  </xml>
  \stopPARSEDXML
  \stopxcell
  \stopxrow
  \stopxtable
  \stoptext

I wonder why attribute values are parsed so. I don’t know whether this
might be a bug (but this is why I replaced "parsed-xml" with "xml" in my
code).

If I could ask you a favor, would you be so kind to confirm whether
\xmlpos and \xmldepth are misbehaving or not (as already reported in
https://mailman.ntg.nl/pipermail/ntg-context/2022/105495.html and
https://mailman.ntg.nl/pipermail/ntg-context/2022/105604.html)?

Many thanks for your help,

Pablo


More information about the ntg-context mailing list