[NTG-context] Processing XML: Header and footer, data manipulation

Pablo Rodriguez oinos at gmx.es
Mon Apr 22 11:40:58 CEST 2019

On 4/22/19 7:57 AM, Axel Kielhorn wrote:
> [...]
> Some questions remain:

Hi Axel,

I have some questions about your source file:

  \startxmlsetups xml:prozess

If this is hardcoded (I mean, you don’t read it from any XML code), I
would avoid setting the \mainlanguage here.

And you already set it in lines 82-83:


BTW, is there any reason to set both \language and \mainlanguage?
(\mainlanguage should be enough.)

> I want to set page headers based on information I get from the XML:
> \startxmlsetups xml:prozess
>   \setupheadertexts[\bf\xmltext{#1}{/pnr} \xmltext{#1}{/pname}][\date]
> This works on the first page (when the document has more than one
> page) but headers and footers are empty on subsequent pages.
> Something (xmlflush?) overwrites my setup.
> Any idea how I can fix that?

I have a workaround for that:

  \title{\xmltext{#1}{/pnr} \xmltext{#1}{/pname}}

And in your preamble:


> I want to use xmlconcat here, since there may be more than one docan, but I only get the „, “
> \startxmlsetups xml:psoutdoc
> %    \inmargin{\xmltext{#1}{/docan} $\Leftarrow$}  {\bf \xmltext{#1}{/docnr}}\xmlflush{#1}
>     \inmargin{\xmlconcat{#1}{/docan}{, } $\Leftarrow$}  {\bf \xmltext{#1}{/docnr}}\xmlflush{#1}
>     \xmlsave{#1}{outfile.xml}
>     \blank
> \stopxmlsetups

I would avoid using:

  \startxmlsetups xml:docname

instead of "\xmltext{#1}{/docname}" in the proper places.

You need to add to get proper content:

  \startxmlsetups xml:docan

I would replace docname with docan in both places (xmlsetsetup and its
proper \starxmlsetups).

BTW, what should be child notes to #1? An special lpath or what?

Just in case it helps,


More information about the ntg-context mailing list