[NTG-context] Access current element in xmlsetsetup via xml.expressions

achim at jander.de achim at jander.de
Tue Oct 1 21:24:06 CEST 2019


I'm trying to build an xmlsetsetup with an own lua function. XML in MKIV
says on pg. 33:

You can also use normal Lua functions as long as you make sure that you pass
the right arguments.

There are a few predefined variables available inside such functions.

list table the list of matches

l number the current index in the list of matches

ll element the current element that matched

order number the position of the root of the path


But I can't figure out how to get access to list, ll etc.

My MWE (only for testing the access, is always true):



<para>Dies ist <inline style="sup">ein</inline> xxx<inline
style="sub">zwei</inline> noch ein <inline style="sup">sup</inline>
Test<inline style="sub">sub</inline></para>





  function xml.expressions.nextnodeatt(e)







\startxmlsetups xml:textsetups








\startxmlsetups xml:para




\startxmlsetups xml:sub









Thanks in advance,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20191001/755b3fd3/attachment.html>

More information about the ntg-context mailing list