From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/9069 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XML processing Date: Mon, 26 Aug 2002 16:40:26 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20020826163848.021a7438@server-1> References: <20020826123344.9BEC06%05570575@gmx.de> 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 1035399428 454 80.91.224.250 (23 Oct 2002 18:57:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:57:08 +0000 (UTC) Cc: ntg-context Original-To: drymartini@gmx.de (Robbie Pickering) In-Reply-To: <20020826123344.9BEC06%05570575@gmx.de> Xref: main.gmane.org gmane.comp.tex.context:9069 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:9069 At 12:33 PM 8/26/2002 +0100, Robbie Pickering wrote: >OK, I'm stymied here. > >What i'm trying to do is typeset a dictionary entry from XML. It's >relatively simple so far. But there are occasions when I'd like to have >the same tags treated differently according to the context. Maybe you can use: \startXMLmapping [local] \defineXMLenvironment [whatever] {[} {]} \stopXMLmapping \defineXMLenvironment [whatever] {(} {)} \defineXMLenvironment [test] {\startXMLmapping[local]} {\stopXMLmapping} \startbuffer Let's see how a how some nested text comes out. \stopbuffer \starttext \processXMLbuffer \stoptext Alternaively you can use grouping and locally redefine elements. >We have for example definitions DEFN which are sometimes followed by an >example EGPH and sometimes not. > >... >3 >a large body, esp. of a person >he eased his bulk out of the chair >4 >unpackaged cargo or goods > >I have setup DEFN very simply > >\defineXMLenvironment [DEFN] {}{.} >to add a full stop after the definition. It would be nice, though, to be >able to automatically add a colon instead in those cases where the DEFN >environment is immediately followed by a EGPH. > >is the XML parsing code robust enough that one could start messing >around with counters, etc. in the arguments of a \defineXMLenvironment? >Or is there a better way of going about this? what kind of messing? ------------------------------------------------------------------------- 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 ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------