On 11/16/22 21:51, Denis Maier via ntg-context wrote:
Just a quick question regarding this? Is xml.filter equivalent to \xmlfilter? If so, how do you pass the match to a command as you'd do with \xmlfilter?
I'm still digesting and playing with Massi's reply; will probably be back with more questions :-)
Anyway: If you've filtered something out like this local tree = xml.filter (t, "../chapter[@title='mytitle'") you can then apply a command to it lxml.command(lxml.id(tree), ".", "xml:chapter:command") and have to define the command as \startxmlsetups xml:chapter:command \xmltext {#1} {content} \stopxmlsetups for example. Thomas ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________