From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/7129 Path: main.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: CDATA/XML Date: Wed, 6 Mar 2002 10:45:52 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <20020306104552.148a7bc2.taco@elvenkind.com> References: <20020305193014.GA4953@miwie.in-berlin.de> <20020306091901.7f998665.taco@elvenkind.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035397615 16693 80.91.224.250 (23 Oct 2002 18:26:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:26:55 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: mw@miwie.in-berlin.de In-Reply-To: <20020306091901.7f998665.taco@elvenkind.com> Xref: main.gmane.org gmane.comp.tex.context:7129 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:7129 > > How does ConTeXt handle CDATA sections in XML? > > Incorrectly :). I'd post a fix later today. > > Meanwhile, this works OK: Oops, it didn't. :( Here is a fix for Context that makes sure it behaves ok wrt. CDATA sections. Should be included somewhere on top of the document or in cont-usr.tex (until it makes it into the distribution) % start of patch \let\doxparseXMLescape\xparseXMLescape \def\xparseXMLescape!#1% {\if[#1% \expandafter\expandafter\expandafter\doCDATAsection \else \if-#1% \expandafter\expandafter\expandafter\doCOMMENT \else \expandafter\expandafter\expandafter\doparseXMLescape \fi\fi !#1} \def\doCDATAsection![#1[% {\skipfirstverbatimlinefalse \processtaggeddisplayverbatim{]]>}} \def\doCOMMENT {\gobbleuntil{-->}} % end of patch