Hello once again,
I've puzzled my brain for a while ;-)
and then I came to the following solution:
\def\ExChapter#1{
\expanded{\chapter{#1}}
}
\defineXMLcommand[chapter]{
\defineXMLargument[title]\ExChapter
}
From the first tests, it seems to work fine, anyway, I'm not sure if it won't break anything else... :-/
Anyway, thank for your hint with the expansion!
-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
___________________________________________________________________________________