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

2019-10-02 Thread achim
Betreff: Re: [NTG-context] Access current element in xmlsetsetup via xml.expressions On 10/2/2019 12:32 PM, mf wrote: > The answer is in lxml-lpt.lua, where built-in expressions are defined. > You need a good knowledge of LPEG that i miss. > > Some built-in expressions get the cur

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

2019-10-02 Thread Hans Hagen
On 10/2/2019 12:32 PM, mf wrote: The answer is in lxml-lpt.lua, where built-in expressions are defined. You need a good knowledge of LPEG that i miss. Some built-in expressions get the current element as first argument, like count() or child() (lines 1300-1307 of lxml-lpt.lua):

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

2019-10-02 Thread mf
The answer is in lxml-lpt.lua, where built-in expressions are defined. You need a good knowledge of LPEG that i miss. Some built-in expressions get the current element as first argument, like count() or child() (lines 1300-1307 of lxml-lpt.lua): expressions.child = function(e,pattern)

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

2019-10-02 Thread Taco Hoekwater
> On 1 Oct 2019, at 21:24, ac...@jander.de wrote: > > Hello, > 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

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

2019-10-01 Thread achim
Hello, 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