At 11:13 PM 2/14/2002 +0100, Simon Pepping wrote:
>Hans,
>
>This looks good. But it does not reproduce the order of the elements
>right if one of the elements does not occur in the first row, but does
>in one of the following: it comes last.
>
>I think it is too ambitious to dynamically determine the order in such
>cases. So I reworked your code for the case of a predetermined order.
>
>% first pass, header
>
>\unprotect
>
>% when the element occurs, register it
>\def\environmentSaveElement#1%
>     {\defineXMLenvironmentsave[#1]
>                 {\@EA\gdef\csname used!#1\endcsname{1}} \donothing}
>
>% if the element is used,
>% typeset the TH cell and add element to the list of elements used
>\def\showElementTH#1{%
>         \@EA\ifx\csname used!#1\endcsname\relax\else
>                 \bTD#1\eTD
>                 \doglobal\addtocommalist{#1}\ElementsUsed
>         \fi
>}

There are \doifXMLdata and \doifelseXMLdata that can be used for that; 
saves hash entries and looks cleaner

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-pod.nl
-------------------------------------------------------------------------

Reply via email to