[NTG-context] xml and lua again

Thomas A. Schmitz thomas.schmitz at uni-bonn.de
Mon Oct 24 14:18:26 CEST 2011


On 10/24/2011 12:17 PM, Hans Hagen wrote:
> why so complex

Hi Hans,

yes, I'm aware that this procedure is quite silly for this example, this 
was just for myself, for educational purposes. As soon as the setup 
becomes more complex, I thought it might be easier to collect and 
process the options in lua than in tex (as I have done before), but I'm 
running against a wall here (see my exchange with Peter about goat milk 
yesterday). So the real question is: how can I collect data such as an 
attribute value to process it with lua, say in the form

    if lxml.att(t, "frame") == "on" then
       context("Yes, the frame is really on!")
    else
       context("Nope, sorry, it's still off.")
    end

I don't really understand what kind of object a call such as lxml.att(t, 
"frame") produces.

All best

Thomas


More information about the ntg-context mailing list