From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36884 Path: news.gmane.org!not-for-mail From: "Richard Gabriel" Newsgroups: gmane.comp.tex.context Subject: Re: Problem with XML entities in titles [2] Date: Thu, 04 Oct 2007 14:33:02 +0200 Message-ID: <20071004123302.4d9c51ec@mx1.kerio.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1150563612==" X-Trace: sea.gmane.org 1191501263 5240 80.91.229.12 (4 Oct 2007 12:34:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Oct 2007 12:34:23 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 04 14:34:21 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IdPto-00020c-1u for gctc-ntg-context-518@m.gmane.org; Thu, 04 Oct 2007 14:33:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4B8141FDCC; Thu, 4 Oct 2007 14:33:47 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03756-02-6; Thu, 4 Oct 2007 14:33:30 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A84B71FD8C; Thu, 4 Oct 2007 14:33:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 869E71FD72 for ; Thu, 4 Oct 2007 14:33:17 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03756-02-5 for ; Thu, 4 Oct 2007 14:33:08 +0200 (CEST) Original-Received: from mx1.kerio.com (mx1.kerio.com [195.39.55.2]) by ronja.ntg.nl (Postfix) with ESMTP id BC9261FB21 for ; Thu, 4 Oct 2007 14:33:07 +0200 (CEST) Original-Received: from localhost ([127.0.0.1]) by mx1.kerio.com for ntg-context@ntg.nl; Thu, 4 Oct 2007 14:33:04 +0200 In-Reply-To: 115224fb0710040447h6e23e9e6h4b79b3dd0e1df14f@mail.gmail.com X-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:36884 Archived-At: This is a multi-part message in MIME format. --===============1150563612== Content-Type: multipart/alternative; boundary="-----------c4966ef566e8892ef9457bc3efe14992" This is a multi-part message in MIME format. -------------c4966ef566e8892ef9457bc3efe14992 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Wolfgang, thanks for Your hint. > I'm not Hans but I can also give you a solution to your problem. OK, sorry, maybe I shouldn't address Hans directly when writing to the m= ailing list... ;-) > BTW: Your xml file is valied because you forgot to include the >chapter end tag. Ooops! I've quickly created a minimal test file; of course I didn't want= to attach the real file where I've encountered that problem... Anyway, the XML file is structured the following way: This is a testing chapter Some meaningless text... So — let's see Some meaningless text... ... the paragraphs are enclosed inside chapters. So unfortunately I can't use your solution because the \chapter command = needs to be issued at the beginning, not at the end tag. Got any another idea=3F Many thanks, Richard =20 =5F=5F=5F=5F=5F =20 From: Wolfgang Schuster [mailto:schuster.wolfgang@googlemail.com] To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl] Sent: Thu, 04 Oct 2007 13:47:27 +0200 Subject: Re: [NTG-context] Problem with XML entities in titles [2] 2007/10/4, Richard Gabriel : > Hello Hans, > > some time ago I've reported this problem with character entities. I'= ve just > upgraded to ConTeXt 2007-09-28, and the problem still persists! > Could you please look into it=3F A simple test file is attached. > > Many thanks, > Richard =20 Hello Richard, =20 I'm not Hans but I can also give you a solution to your problem. =20 This is related to your own definition for the chapter header and ConTeXt's mechanism to save the two pass information of the headers, you should save the header text and expand the header command with the header text, you can use my example for your problem. =20 BTW: Your xml file is valied because you forgot to include the chapter end tag. =20 \defineXMLenvironment [chapter] {\defineXMLsave[title]} {\expanded{\chapter{\XMLflush{title}}}} =20 \defineXMLenvironment[para] \dontleavehmode \par =20 \defineXMLentities [tex] {tex} {\TeX} =20 \starttext \completecontent =20 \startXMLdata This is a testing &tex; chapter Some meaningless text... \stopXMLdata =20 \stoptext =20 Wolfgang =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F If your question is of interest to others as well, please add an entry= to the Wiki! =20 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg= -context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =20 -------------c4966ef566e8892ef9457bc3efe14992 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Wolfgang,

thanks for Your hint.

> I'm not Hans bu= t I can also give you a solution to your problem.
OK, sorry, maybe I = shouldn't address Hans directly when writing to the mailing list... ;-)<= br>
> BTW: Your xml file is valied because you forgot to include t= he
>chapter end tag.

Ooops! I've quickly created a minimal = test file; of course I didn't want to attach the real file where I've en= countered that problem...

Anyway, the XML file is structured the = following way:

<chapter><title>This is a&nbsp;tes= ting chapter</title>
<para>Some meaningless text...</p= ara>
</chapter>

<chapter><title>So &m= dash; let's see</title>
<para>Some meaningless text...<= ;/para>
</chapter>

... the paragraphs are enclosed in= side chapters.
So unfortunately I can't use your solution because the= \chapter command needs to be issued at the beginning, not at the end ta= g.

Got any another idea=3F


Many thanks,
Richard
=

 


<= b>From: Wolfgang Schuster [mailto:schuster.wolfgang@googlemail.com]<= br>To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl]=
Sent: Thu, 04 Oct 2007 13:47:27 +0200
Subject: Re: = [NTG-context] Problem with XML entities in titles [2]

2007/10/4, = Richard Gabriel <rgabriel@kerio= .com>:
> Hello Hans,
>
> some time ago I've reported this problem with character entities. I= 've just
> upgraded to ConTeXt 2007-09-28, and the problem still persists!
> Could you please look into it=3F A simple test file is attached. >
> Many thanks,
> Richard

Hello Richard,

I'm not Hans but I can also give you a solution to your problem.

This is related to your own definition for the chapter header and
ConTeXt's mechanism to save the two pass information of the headers,
you should save the header text and expand the header command
with the header text, you can use my example for your problem.

BTW: Your xml file is valied because you forgot to include the
chapter end tag.

\defineXMLenvironment [chapter]
{\defineXMLsave[title]}
{\expanded{\chapter{\XMLflush{title}}}}

\defineXMLenvironment[para] \dontleavehmode \par

\defineXMLentities [tex] {tex} {\TeX}

\starttext
\completecontent

\startXMLdata
<chapter><title>This is a testing &tex; chapter</titl= e></chapter>
<para>Some meaningless text...</para>
\stopXMLdata

\stoptext

Wolfgang
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
If your question is of interest to others as well, please add an entry t= o the Wiki!

maillist : ntg-context@ntg.nl = / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http= ://contextgarden.net
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
-------------c4966ef566e8892ef9457bc3efe14992-- --===============1150563612== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1150563612==--