At 11:33 PM 3/16/2002 +0100, Michael Wiedmann wrote:
>Hi Hans,
>
>I need your help for the following:
>
>in DocBook a graphic is included like:
>
>mediaobject
> imageobject
> imagedata
> caption
>
>I have already a very simple mapping of the imagedata (the actual
>graphic file) to context's \placefigure, that's good.
>
>Now I want to get the 'caption' (if provided) to pass it on to
>\placefigure as a parameter.
>
>I tried:
>
>\defineXMLenvironment[mediaobject]
> {\defineXMLpush[caption]}
> {}
>
>\def\XMLDBmakefigure{%
> \def\XMLDBfigurealign{\XMLpar{imagedata}{align}{}}%
> \placefigure[\XMLDBfigurealign][]{\XMLpop{caption}}
> {\externalfigure[\XMLpar{imagedata}{fileref}{}]}
>}
>\defineXMLargument[imagedata] \XMLDBmakefigure
>
>But unfortunately this does not work, so I surely do misinterpret the
>usage of \defineXMLpush and \XMLpop.
btw, it's save and flush now
>Any hints for me?
You need to save both the imageobject and caption and at the end of
mediaobject use them; now you want to typeset the figure before the caption
element is seen
[see x-contml on how figures are handled]
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
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
-------------------------------------------------------------------------
fall-back web server:
www.pragma-ade.nl
-------------------------------------------------------------------------