[NTG-context] XML and references

Johannes Graumann johannes_graumann at web.de
Mon Apr 3 17:27:08 CEST 2006


Hans,

When this is done, I will have to make a trip to Zwolle and buy you a beer!
Thank you once again!

Joh

Hans Hagen wrote:

> 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
> -----------------------------------------------------------------




More information about the ntg-context mailing list