Tables make a lot of groups. When your <var> tag is read, your parameter is defined in a group. When you use it in the next cell, you are in another group, and your parameter value has disappeared. Try this: \defineXMLenvironment [var] {\xdef\varname{\XMLpar{var}{name}{blah}} \NC \varname \NC } {\NC\NR } On Fri, Jun 06, 2003 at 12:06:39AM +0200, Jedrzej Nasiadek wrote:
Hi,
So I've got to use this modern XML thingy.. ;-) I tried to set up ConTeXt to typeset processed XML data. What goes wrong is the \XMLpar which sometimes gives default value instead of the real one. See the code below:
\starttext \defineXMLpickup [log] {\starttabulate[|p(7cm)|p|] \HL\NC ObjectID \NC Value \NC\NR\HL} {\stoptabulate}
\defineXMLenvironment [var] {\NC \XMLpar{var}{name}{blah} \NC } {\NC\NR }
\startXMLdata <log> <entry date="1054844187"> <var name=".1.3.6.1.2.1.5.16.0"> 28674524 </var> </entry> <entry date="1054844247"> <var name=".1.3.6.1.2.1.5.16.0"> 28674677 </var> </entry> <entry date="1054844307"> <var name=".1.3.6.1.2.1.5.16.0"> 28674824 </var> </entry> <entry date="1054844367"> <var name=".1.3.6.1.2.1.5.16.0"> 28674963 </var> </entry> </log> \stopXMLdata
\stoptext
If I remove the \NC before \XMLpar -- it gives the real value of the name attribute.
Jedrzej _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- Simon Pepping email: spepping@scaprea.hobby.nl