Dear all, I would like to use the combination feature from an XML source. My XML environment file includes the following definitions: \defineXMLenvironment[combination] {\expanded{\startcombination[\XMLpar{combination}{layout}{2}*\XMLpar{combination}{rows}{1}]}} {\stopcombination} \defineXMLpickup[combinationentry] {\defineXMLpush[combinationitem]\defineXMLpush[combinationcaption]} {\expanded{\bgroup\XMLpop{combinationitem}\egroup\bgroup\XMLpop{combinationcaption}\egroup}} The XML source that I use looks like this: <combination columns="2" rows="1"> <combinationentry> <combinationitem>Image A</combinationitem> <combinationcaption>Caption for image A</combinationcaption> </combinationentry> <combinationentry> <combinationitem>Image B</combinationitem> <combinationcaption>Caption for image B</combinationcaption> </combinationentry> </combination> When I process this file I always get the following error: ! Missing { inserted. <to be read again> \def \parseXMLelement #1#2 #3>->\def \currentXMLarguments {#3}\if #1/\chardef \ki... l.5 <combinationentry> ? I have tried different variations without any success. Maybe somebody can help me. Vik -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
At 03:35 PM 2/10/2003 +0100, varheit@gmx.de wrote:
Dear all,
I would like to use the combination feature from an XML source.
My XML environment file includes the following definitions:
\defineXMLenvironment[combination]
{\expanded{\startcombination[\XMLpar{combination}{layout}{2}*\XMLpar{combination}{rows}{1}]}} {\stopcombination}
\defineXMLpickup[combinationentry] {\defineXMLpush[combinationitem]\defineXMLpush[combinationcaption]}
{\expanded{\bgroup\XMLpop{combinationitem}\egroup\bgroup\XMLpop{combinationcaption}\egroup}}
The XML source that I use looks like this:
<combination columns="2" rows="1"> <combinationentry> <combinationitem>Image A</combinationitem> <combinationcaption>Caption for image A</combinationcaption> </combinationentry> <combinationentry> <combinationitem>Image B</combinationitem> <combinationcaption>Caption for image B</combinationcaption> </combinationentry> </combination>
ah, real trickery is needed here: \defineXMLenvironment [combination] [columns=2,rows=1] {\scratchtoks\emptytoks \expanded{\appendtoks \noexpand \startcombination [\XMLop{columns}*\XMLop{rows}]}\to \scratchtoks} {\appendtoks \stopcombination \to \scratchtoks \the\scratchtoks} \defineXMLprocess[combinationentry] \defineXMLpickup [combinationitem] {\appendtoks\bgroup}{\egroup\to\scratchtoks} \defineXMLpickup [combinationcaption] {\appendtoks\bgroup}{\egroup\to\scratchtoks} I can add such thing to x-contml.tex if needed Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (2)
-
Hans Hagen
-
varheit@gmx.de