ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Problem with XML entities in titles [2]
Date: Thu, 4 Oct 2007 13:47:27 +0200	[thread overview]
Message-ID: <115224fb0710040447h6e23e9e6h4b79b3dd0e1df14f@mail.gmail.com> (raw)
In-Reply-To: <20071004093210.6799bc71@mx1.kerio.com>

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
___________________________________________________________________________________


  parent reply	other threads:[~2007-10-04 11:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04  9:32 Richard Gabriel
2007-10-04 10:52 ` Mojca Miklavec
2007-10-04 11:47 ` Wolfgang Schuster [this message]
2007-10-04 12:33 Richard Gabriel
2007-10-04 14:36 Richard Gabriel
2007-10-04 18:26 ` Hans Hagen
2007-10-05 10:06 Richard Gabriel
2007-10-05 11:53 ` Hans Hagen
2007-10-05 12:03 ` Thomas A. Schmitz
2007-10-05 14:16   ` Hans Hagen
2007-10-05 12:47 Richard Gabriel
2007-10-05 15:06 Richard Gabriel
2007-10-05 15:55 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=115224fb0710040447h6e23e9e6h4b79b3dd0e1df14f@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).