From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6224 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XML - same element on more levels Date: Tue, 20 Nov 2001 11:21:55 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20011120111804.03148ba8@server-1> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035396764 8644 80.91.224.250 (23 Oct 2002 18:12:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:12:44 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Lukas Kubin In-Reply-To: Xref: main.gmane.org gmane.comp.tex.context:6224 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6224 At 08:34 PM 11/16/2001 +0100, Lukas Kubin wrote: >Let's say I have following document: > > > My Document > Myself > > > Chapter One > . > . > . > > > > >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 | pragma@wxs.nl 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 -------------------------------------------------------------------------