Thanx Wolfgang. So far I have never worked with namespaces as follows. I thought that \setvariables macro automatically namespace for variables creates and sets the values in it. Setvariables somehow connected with the creation of macro variables in the namespace of the given name? It appears that the following example shows that it is not ... \starttext \definenamespace[myspace][name=myspace,command=yes,setup=yes,parent=one] \setupmyspace[ id=3, graphcolor=green, ] \setvariables[myspace][ id=5, graphcolor=blue, ] \myspaceparameter{id} \myspaceparameter{graphcolor} \stoptext Thanx Jaroslav Dne 9.9.2012 12:45, Wolfgang Schuster napsal(a):
Am 09.09.2012 um 12:35 schrieb Jaroslav Hajtmar
: Thanx Wolfgang.
I do not know anything about such a possibility. What do you mean? Can you show a simple example? I tried several options but nothing works. Here are some examples:
\setvariables[myspacename][id=1, value={value}]
\getparameters[myotherspacename][id=1, value={value}]
\starttext
% \myspacenameid % not work % \myspacename{id} % not work % \myspacenameparameter{id} % not work % ???
\myotherspacenameid % this works only
\stoptext
When you use \getparameter you have to define the command yourself, e.g.
\def\mynamespaceid#1{\csname mynamespace#1\endcsname}
or you use \definenamespace which creates all these commands for you:
\starttext
\definenamespace[one][name=one,command=yes,setup=yes,parent=one] \definenamespace[two][name=two,command=yes,setup=yes,parent=one]
% With this parent setting \twoparameter uses the values from \setupone % when no value is set with \setuptwo.
\unprotect \setuptwo[parent=\????one] \protect
\setupone[one=One,two=Two]
\starttabulate \NC one:one \EQ \oneparameter{one} \NC\NR \NC one:two \EQ \oneparameter{two} \NC\NR \NC two:one \EQ \twoparameter{one} \NC\NR \NC two:one \EQ \twoparameter{two} \NC\NR \stoptabulate
\setuptwo[one=1,two=2]
\starttabulate \NC one:one \EQ \oneparameter{one} \NC\NR \NC one:two \EQ \oneparameter{two} \NC\NR \NC two:one \EQ \twoparameter{one} \NC\NR \NC two:one \EQ \twoparameter{two} \NC\NR \stoptabulate
\stoptext
Wolfgang