Johannes Graumann wrote:
Hello all,
I'm trying to interpret something like <section label="intro:mixtureprob"> <title>The problem of the complex protein mixture</title> <content> <ref name="intro:mixtureprob"/> </content> </section>
With the follwing mapping rules and am failing: \defineXMLenvironment [section] { \defineXMLargument [title] [\XMLpar{section}{label}{}]
wrong argument, should be [name=]
{\section} \defineXMLenvironment [content] {}{} } {} \defineXMLargument [ref] {\textreference[\XMLpar{ref}{name}{}]}
wrong command \textreference should be \in
I would appreciate any insight into my folly ...
Thanks, Joh
\defineXMLenvironment [section] {\setups{section:define}} {} \startsetups section:define \defineXMLargument [title] [label=] {\expanded{\section[\XMLpar{section}{label}{}]}} \defineXMLprocess [content] \stopsetups \defineXMLenvironmentsave [pageref] [name=] {} {\at{\XMLflush{pageref}}[\XMLop{name}]} \defineXMLenvironmentsave [textref] [name=] {} {\in{\XMLflush{textref}}[\XMLop{name}]} \starttext \startXMLdata <section label="intro:mixtureprob"> <title>The problem of the complex protein mixture</title> <content> <pageref name="intro:mixtureprob"/> <textref name="intro:mixtureprob"/> <pageref name="intro:mixtureprob">page</pageref> <textref name="intro:mixtureprob">chapter</textref> </content> </section> \stopXMLdata \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------