On 12/1/2025 12:06 AM, Jean-Pierre Delange via ntg-context wrote:
Hans,
Thank you for your clarification ! Just to answer your question:
'lxp.lom' is not something specific to ConTeXt — it comes from LuaExpat,
a very common XML parser used in many Lua examples and libraries. When
writing a small didactic TEI-demo in MkIV (my purpose is to document
ConTeXt Garden and some pages on TEI-XML for a Wikibook in French, which
I'm currently writing), I instinctively used it because it provides a
very simple Lua object model (tag attr, array-like children) , which is
handy for beginners experimenting with XML in Lua.
I lately understand that ConTeXt aims to remain completely self-
contained, and that the internal XML machinery should be preferred. The
failure occurred simply because 'lxp.lom' is not part of the standalone
environment, both in MkIV and in LMTX.
No problem at all: I will rewrite the TEI example using ConTeXt’s native
XML interface(\xmlload, xml-first, xml-text, etc.). This will make it
fully portable across both MkIV and LMTX.
The built in interface has been around more or less from the start and
is quite integrated (you can also use the xml processing code from the
lua end if needed as is also sits in mtxrun). Integration has advantages
for dealing with special characters, entities etc. It's also quite
efficient and fast (my collegue needs it for some math books where
thousands of xml files have to be loaded runtime without much noticable
overhead so those are our benchmarks). For those who need it, there is
also synctex support for loaded xml files.
You can also find examples / replies in the mail archive by Thomas,
Massi etc who use advanced xml processing for books, lecture notes etc.
so the interfaces are rather stable and tested.
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________