Dear all,

I had asked a similar question some time ago and had received a reply from Hans (http://article.gmane.org/gmane.comp.tex.context/81049), but the method there doesn't work in this case. Working example difficult, hence code snippets, I'm afraid.

I process file A.xml. I pull in stuff from file B.xml and store the result as a lua table:

for e in xml.collected(xml.load('B.xml'), 'a') do
   for d in xml.collected(lxml.id(e), 'b') do
      local sortword = xml.attribute(b, "/", "xml:id", "0")
      local entryword = xml.text(b, "entry")
      local translation = xml.first(b, "translation")
      mytable[sortword] = { }
      mytable[sortword]["ew"] = entryword
      mytable[sortword]["tr"] = translation
   end
end

so the table contains the xml. The "translation" part contains further nested xml elements. Later, when processing A.xml, I want to retrieve this stored xml and have it processed:

local checkword = xml.text(t, "c")
local translation = mytable[checkword]["tr"]

but whatever I try:

lxml.flush(lxml.id(translation))

or

xml.cprint(voktable[myword]["tr"])

or

xml.cprint(translation)

I always get the serialized xml typeset, but not processed. So: how can I get context to process the xml that is stored in the table?

All best

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