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 mailing 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:
<chapter><title>This is a testing chapter</title>
<para>Some meaningless text...</para>
</chapter>
<chapter><title>So — let's see</title>
<para>Some meaningless text...</para>
</chapter>
... 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?
Many thanks,
Richard
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 <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? 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</title></chapter>
<para>Some meaningless text...</para>
\stopXMLdata
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________