ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Simon Pepping <spepping@scaprea.hobby.nl>
Subject: Re: XML Processing Instructions
Date: Thu, 21 Mar 2002 20:36:42 +0100	[thread overview]
Message-ID: <20020321203641.F375@scaprea> (raw)
In-Reply-To: <20020318201136.GA7141@miwie.in-berlin.de>; from mw@miwie.in-berlin.de on Mon, Mar 18, 2002 at 09:11:36PM +0100

On Mon, Mar 18, 2002 at 09:11:36PM +0100, Michael Wiedmann wrote:
> How do I best handle - non ConTeXt related - XML Processing
> Instructions?

\defineXMLenvironment[phrase] {Phrase: } {}
\defineXMLprocessor[some-pi] \dosomepi
\def\dosomepi#1{(Some PI: #1)}

\starttext
\startXMLdata
<phrase>foo foo foo <?some-pi do this?> bla bla bla</phrase>
\stopXMLdata
\stoptext

> Given:
> 
> <phrase>foo foo foo <?some-pi?> bla bla bla</phrase>
> 
> and a mapping of
> 
> \defineXMLenvironment[phrase] \em
> 
> the rendering stops right after the last "foo".
> 
> I just want ConTeXt to ignore the PI.

That is because context expects a form like <?pi-name pi-data?>. The
data are inserted as a single token after the defined XML processor,
and thus can be picked up by it as an argument. If no processor is
defined, the data is ignored.

Simon

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


  reply	other threads:[~2002-03-21 19:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-18 20:11 Michael Wiedmann
2002-03-21 19:36 ` Simon Pepping [this message]
2002-03-23 13:28   ` Michael Wiedmann
2002-03-23 10:08     ` Hans Hagen
2002-03-24 21:23     ` Simon Pepping
2002-03-24 22:50       ` Michael Wiedmann
2022-05-02  7:19 XML processing instructions Duncan Hothersall via ntg-context
2022-05-02  7:33 ` Duncan Hothersall via ntg-context
2022-05-02  7:44 ` Denis Maier via ntg-context
2022-05-02  7:48   ` Denis Maier via ntg-context
2022-05-02  8:24     ` Duncan Hothersall via ntg-context
2022-05-03  7:30       ` Duncan Hothersall via ntg-context

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=20020321203641.F375@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).