Hi all,

I'm pulling my hair - thought this was easy, but turns out to be more 
difficult. The \externalfigure command can take a width and/or a height 
parameter, and context will be happy to take either one into account. I'm 
trying to translate that into xml syntax. Here's a minimal example that I can't 
make work. If anyone can explain what to do here, I might be able to work this 
out (or will be back with more questions :-)

\startbuffer[test]
<a>
  <externalfigure height="1cm" resource="hacker"/>
</a>
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|externalfigure}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
  \xmlflush{#1}\par
\stopxmlsetups 

\startxmlsetups xml:externalfigure
  \externalfigure[\xmlatt{#1}{resource}]
                 
[\doifnotempty{\xmlatt{#1}{height}}{height=\xmlatt{#1}{height}}]
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext 

The "height" attribute is not taken into account - why? 

All best

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 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
___________________________________________________________________________________

Reply via email to