From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6866 Path: main.gmane.org!not-for-mail From: Simon Pepping Newsgroups: gmane.comp.tex.context Subject: defineXMLpush and grouping Date: Fri, 8 Feb 2002 21:58:56 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <20020208215856.A384@scaprea> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" X-Trace: main.gmane.org 1035397371 14466 80.91.224.250 (23 Oct 2002 18:22:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:22:51 +0000 (UTC) Original-To: ntg-context@ntg.nl Xref: main.gmane.org gmane.comp.tex.context:6866 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6866 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii \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: spepping@scaprea.hobby.nl --BOKacYhQ+x31HxR3 Content-Type: text/x-tex Content-Disposition: attachment; filename="problem9.tex" % 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 Stein Gjoen
sgjoen@nyx.net
\stopbuffer \processXMLbuffer \stoptext --BOKacYhQ+x31HxR3--