At 08:34 PM 11/16/2001 +0100, Lukas Kubin wrote:
>Let's say I have following document:
>
><document>
>   <title>My Document</title>
>   <author>Myself</author>
>   <text>
>     <chapter>
>       <title>Chapter One</title>
>       .
>       .
>       .
>     </chapter>
>   </text>
></document>
>
>How do I do the ConTeXt mapping for the second title element? I would like
>to have the /document/title level mapped as \title{My Document} and
>/document/text/chapter/title as \chapter{Chapter One}


One way is to redefine elements within another one, so

\defineXMLenvironment [chapter]
   {\bgroup
    \defineXMLargument [chapter] \chapter}
   {\egroup}


Another one is, which may not yet work in your version,

\startXMLmapping [chapter]

\defineXMLargument [title] \chapter

\stopXMLmapping

\defineXMLenvironment [chapter]
   {\startXMLmapping[chapter]}
   {\stopXMLmapping}


Other methods will probably be implemented too

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

Reply via email to