I get an error with the code below. Is it (im)possible to fill a buffer from xml-processing in this manner? Or is there another way? The xml: <description>contents of description</description> The setups: \startxmlsetups xml:case:description \startbuffer[BESCHRIJVING] \xmlflush{#1} \stopbuffer \stopxmlsetups The error message: Runaway argument? \xmlflush {dvd::24}\stopbuffer \startcase \dvdfrontpagina [\PAGEFIGURE \ETC. ! File ended while scanning use of \dododowithbuffer. ConTeXt ver: 2010.03.02 12:34 MKIV fmt: 2010.3.8 int: english/english Hans van der Meer
On 9-3-2010 11:26, Hans van der Meer wrote:
I get an error with the code below. Is it (im)possible to fill a buffer from xml-processing in this manner? Or is there another way?
The xml: <description>contents of description</description>
The setups: \startxmlsetups xml:case:description \startbuffer[BESCHRIJVING] \xmlflush{#1} \stopbuffer \stopxmlsetups
The error message: Runaway argument? \xmlflush {dvd::24}\stopbuffer \startcase \dvdfrontpagina [\PAGEFIGURE \ETC. ! File ended while scanning use of \dododowithbuffer.
buffers don't work inside a setup but why do you need a buffer? you can explicitly flush content \xmlfirst{#1}{description} and such so there is no need for buffers; in fact, the whole file is buffered and you can consider each element to be a buffer Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 9 mrt 2010, at 11:31, Hans Hagen wrote:
On 9-3-2010 11:26, Hans van der Meer wrote:
I get an error with the code below. Is it (im)possible to fill a buffer from xml-processing in this manner? Or is there another way?
The xml: <description>contents of description</description>
The setups: \startxmlsetups xml:case:description \startbuffer[BESCHRIJVING] \xmlflush{#1} \stopbuffer \stopxmlsetups
The error message: Runaway argument? \xmlflush {dvd::24}\stopbuffer \startcase \dvdfrontpagina [\PAGEFIGURE \ETC. ! File ended while scanning use of \dododowithbuffer.
buffers don't work inside a setup
but why do you need a buffer? you can explicitly flush content
I want a buffer because I must save the contents until I can call it up later on. The solution below flushes the contents prematurely.
\xmlfirst{#1}{description}
and such so there is no need for buffers; in fact, the whole file is buffered and you can consider each element to be a buffer
Hans
Hans van der Meer
On 9-3-2010 11:37, Hans van der Meer wrote:
I want a buffer because I must save the contents until I can call it up later on. The solution below flushes the contents prematurely.
hm, normally you can do that in a parent node (or you can backtrack and call it then) another option is to save the reference (#1) \def\MyFunnyBuffer{#1} and then later \xmlflush\MyFunnyBuffer
\xmlfirst{#1}{description}
and such so there is no need for buffers; in fact, the whole file is buffered and you can consider each element to be a buffer
Hans
Hans van der Meer
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Hans van der Meer