On 3/11/26 03:29, Jairo A. del Rio wrote:
> Hi, list. Is there a shortcut for something like this in the ConTeXt XML
> machinery?
>
> \xmlattdef{#1}{lang}{\xmlatt{#1}{language}}
Hi Jairo,
do you what to avoid having to type something similar to the following?
\xmlattdef{#1}{lang}
{\xmlattdef{#1}{xml:lang}
\xmlatt{#1}{language}}
I’m not aware of such a command, but from `lxml-tex.lua` (line 2080) and
`lxml-ini.lua` (lines 44-45) I realized new commands could be defined:
\protected\def\xmllangchaos#1%
{\ctxlua{lxml.att('#1','language',
lxml.att('#1','lang',
lxml.att('#1','xml:lang')))}}
I hope it helps,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________