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: [EMAIL PROTECTED]

Reply via email to