From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/4718 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XML entitities Date: Tue, 22 May 2001 15:32:03 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20010522153203.0192cbd0@server-1> References: <000901c0e2af$a73e3540$5c37893e@tigger> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035395361 28136 80.91.224.250 (23 Oct 2002 17:49:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:49:21 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: "Christopher Tipper" In-Reply-To: <000901c0e2af$a73e3540$5c37893e@tigger> Xref: main.gmane.org gmane.comp.tex.context:4718 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:4718 At 12:08 PM 5/22/01 +0100, Christopher Tipper wrote: >Dear Hans, > >I have a query about XML entities. When I am using XSLT (james clark's excellent XT processor) I have to pass HTML entities through in the form &pound; as opposed to £. As a result all my source XML has entitities in this format and my sources are thus currently incomaptible with ConTeXt XML processing engine. > >When I put £ in my XML I get the following result > >Reference to undefined entity 'pound'. Line 20, Position 206 > >Maybe Context is not compatible with XSLT? Well, contetx is not xslt at all; but, even if so, then how would you typeset & ? Anyhow, you want a hack? First change this in xtag-ini: \gdef\xdoXMLentity#1;% {\ifXMLrawentities \expandafter\firstofoneargument \else \expandafter\executeXMLentity \fi{#1}} Now you can say: \defineXMLentity[amp] {\FunnyAmp} \def\FunnyAmp#1;{\getXMLentity{#1}} \defineXMLentity [pound] {(why not use euro's?)} And here we go: \startXMLdata test &pound; test \stopXMLdata Now, is this a hack or not? 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 -------------------------------------------------------------------------