On 10/24/2011 02:26 PM, Hans Hagen wrote:
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 lxml.* calls print something to tex, so when you're at the lua end
and want to stay there you should use the xml.* methods; also, when you
have an element, say e then there is an e.at table that has all attributes

OK, excuse me for being particularly thick today: there doesn't seem to be xml.att, only xml.attribute, so it should be something like:

function tableinit(t)
   if xml.attribute(t, "/", "frame", "off") == "on" then
      context("Yes, the framestate is really on!")
   else
      context("Nope, sorry, it's still off.")
   end
end

(if I understand the definition of xml.attribute correctly: id,pattern,a,default)?

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to