[NTG-context] searching in nodes

Hans van der Meer havdmeer at ziggo.nl
Wed Dec 12 12:57:51 CET 2018


In a Lua function called from within an \startxmlsetups..\stopxmlsetups code block I would like to search through the current node and all below.
Using string.match("to-be-searched”,”pattern”).
The Lua function being called through \def\findmypattern#1#2{\ctxlua{tex.print(hvdm.findmypattern("#1","#2",))}

But I do not seem to get the node contents in the first argument #1. Using \xmlverbatim{#1} fails with Lua error "hexadecimal digit expected near '"\xm’”. \xmlflushpure{#1} fails with Lua error "invalid escape sequence near …”

Any help?

dr. Hans van der Meer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181212/046a5a6e/attachment.html>


More information about the ntg-context mailing list