\defineXMLpush actually makes its definition when the pushed element
occurs. When a parent element defines a group, then the pushed element
is not visible outside that group. In \TeX\ this problem is usually
solved by doing a \gdef. Perhaps this problem can be solved in the
same manner, by providing a \gdefineXMLpush.

See attached example.

-- 
Simon Pepping
email: [EMAIL PROTECTED]
% cont-en

\defineXMLenvironment[author]
% \defineXMLpush is defines the pushed element at the level at which
% it occurs;
	{\bgroup\defineXMLpush[affiliation]\startalignment[middle]\bfb}
	{1:\XMLpop{affiliation}\stopalignment 2:\XMLpop{affiliation}\egroup}
\defineXMLenvironment[address]
	{\startalignment[middle]\it}
	{\stopalignment}
\defineXMLgrouped[email] {Email: \tt}

\setupindenting[medium]

\starttext

\type{\defineXMLpush} actually makes its definition when the pushed
	element occurs. When a parent element defines a group, then the
	pushed element is not visible outside that group. In \TeX\ this
	problem is usually solved by doing a \type{\gdef}. Perhaps this
	problem can be solved in the same manner, by providing a
	\type{\gdefineXMLpush}.

In the example below the affiliation is output within the alignment
set up by author (marked by 1:), but not outside of it (marked by 2:).

\blank[2*big]

\startbuffer
<author>
   <firstname>Stein</firstname>
   <surname>Gjoen</surname>
   <affiliation>
      <address>
         <email>[EMAIL PROTECTED]</email>
      </address>
   </affiliation>
</author>
\stopbuffer

\processXMLbuffer

\stoptext

Reply via email to