From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/53803 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: filter contents of xml elements Date: Wed, 28 Oct 2009 17:54:57 +0100 Message-ID: <4AE87761.5010401@wxs.nl> References: <4AE860A1.9000200@jhnet.nl> <4AE86419.7060401@elvenkind.com> <4AE8683A.4040406@jhnet.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1256748924 15267 80.91.229.12 (28 Oct 2009 16:55:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2009 16:55:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 28 17:55:17 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1N3Bnn-0004dp-A8 for gctc-ntg-context-518@m.gmane.org; Wed, 28 Oct 2009 17:55:15 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DF240C9AFD; Wed, 28 Oct 2009 17:53:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XG5eDGiUlCsp; Wed, 28 Oct 2009 17:53:56 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CEEF2C9AC7; Wed, 28 Oct 2009 17:53:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7CFE2C9A41 for ; Wed, 28 Oct 2009 17:53:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Tj-l2VeP6If3 for ; Wed, 28 Oct 2009 17:53:42 +0100 (CET) Original-Received: from mail.solcon.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id 14DF6C9AB7 for ; Wed, 28 Oct 2009 17:53:41 +0100 (CET) X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-9 (SurgeMail 4.2a2) with ESMTP id 3200-1713362 for ; Wed, 28 Oct 2009 17:54:26 +0100 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <4AE8683A.4040406@jhnet.nl> X-Authenticated-User: hagen@controller-9 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:53803 Archived-At: Jelle Huisman wrote: > On 28/10/2009 15:32, Taco Hoekwater wrote: >> The next does not deserve a price for elegance, but because >> \xmlflush is expandable (this is its best feature, I think!) >> you can use the traditional tex toolkit macros: >> >> \startxmlsetups xml:h3 >> \doifinstringelse{Skip title}{\xmlflush{#1}} >> {} >> {\subject{\xmlflush{#1}}} >> \stopxmlsetups >> >> I'm fairly certain that there are nicer solutions, however. >> > > Thanks Taco, this works, I owe you a beer at next year's ConTeXt > meeting! I'm still interested in a 'proper' xml (= non-TeX) based > solution, anyone? \startxmlsetups xml:h3 \xmldoifnot {#1} {[text()='Skip title']} { \subject{\xmlflush{#1}} } \stopxmlsetups or: \xmlsetsetup {main} {h3[text()='Skip title']} {-} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___________________________________________________________________________________