At 04:13 PM 4/14/2002 +0200, Tobias Burnus wrote:
>I try another example (see "XML in ConTeXt", page 13):
>-------------------------------------
>\version[temporary]
>
>\defineXMLenvironment [text] {\starttext} {\stoptext}
>\defineXMLargument [title] {\chapter[\XMLpar{title}{label}{}]}
>\defineXMLgrouped [tt] {\tt}
>
>\startXMLdata
><title>First chapter</title>
><title label="second">Second chapter</title>
><title>Third Chapter</title>
><?context-command {See also \in{chapter}[second]} ?>
>\stopXMLdata
Ah, then why not init the attribute each time and use the shorter \XMLop
(own parameter):
\defineXMLargument [title] [label=] {\chapter[\XMLop{label}]}
best combine this with:
\setuphead[chapter][expansion=yes]
An unreadable alternative (just illustrating expansion is):
\defineXMLenvironmentpush [title] [label=]
{}
{\expanded{\chapter[\XMLop{label}]{\XMLflush{title}}}}
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------