From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6895 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: DocBook probleempje Date: Fri, 15 Feb 2002 08:46:16 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20020215084156.0300edd8@server-1> References: <5.1.0.14.1.20020213211323.035265d8@server-1> <5.1.0.14.1.20020210215623.02f99fc8@server-1> <20020208220553.B384@scaprea> <5.1.0.14.1.20020210215623.02f99fc8@server-1> <20020211221547.A14372@scaprea> <5.1.0.14.1.20020213211323.035265d8@server-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035397401 14805 80.91.224.250 (23 Oct 2002 18:23:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:23:21 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Simon Pepping In-Reply-To: <20020214231323.A651@scaprea> Xref: main.gmane.org gmane.comp.tex.context:6895 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6895 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 | 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 ------------------------------------------------------------------------- fall-back web server: www.pragma-pod.nl -------------------------------------------------------------------------