ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Simon Pepping <spepping@scaprea.hobby.nl>
Subject: Re: XML processing
Date: Mon, 26 Aug 2002 20:53:12 +0200	[thread overview]
Message-ID: <20020826205312.B649@scaprea> (raw)
In-Reply-To: <20020826123344.9BEC06%05570575@gmx.de>; from drymartini@gmx.de on Mon, Aug 26, 2002 at 12:33:44PM +0100

On Mon, Aug 26, 2002 at 12:33:44PM +0100, Robbie Pickering wrote:
> We have for example definitions DEFN which are sometimes followed by an
> example EGPH and sometimes not.
> 
> ...
> <DNUM>3</DNUM>
> <DEFN>a large body, esp. of a person</DEFN>
> <EGPH>he eased his bulk out of the chair</EGPH>
> <DNUM>4</DNUM>
> <DEFN>unpackaged cargo or goods</DEFN>
> 
> 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.

This is very difficult, because your tagging has no moment at which
this can be concluded: </DEFN> is too early to know, but when there is
no following EGPH, there is nothing that can trigger the period or
colon. It would be easier if the whole definition would be in a
container: <definition><DNUM/><DEFN/><EGPH/></definition>. Then you
can save EGPH, and </definition> could typeset it with preceding
colon, or it could typeset a period.

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

XML parsing is robust enough. In the docbook mapping a context stack
and a depth counter are maintained. 

Simon

-- 
Simon Pepping
email: spepping@scaprea.hobby.nl


  parent reply	other threads:[~2002-08-26 18:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 11:33 Robbie Pickering
2002-08-26 14:40 ` Hans Hagen
2002-08-26 18:53 ` Simon Pepping [this message]
2002-08-26 19:25   ` Hans Hagen
2003-05-20 16:35 XML Processing Alexandre Enkerli
2003-05-21  8:11 ` Berend de Boer
2003-05-21 19:56 ` Simon Pepping
2003-05-21 20:12 ` Johannes Hüsing
2003-05-23 12:46   ` Hans Hagen
2011-12-31 20:55 xml processing Meer, H. van der
2012-01-01 12:14 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020826205312.B649@scaprea \
    --to=spepping@scaprea.hobby.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).