From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59427 Path: news.gmane.org!not-for-mail From: "H. van der Meer" Newsgroups: gmane.comp.tex.context Subject: xml path expression Date: Tue, 8 Jun 2010 12:19:16 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1275992418 14054 80.91.229.12 (8 Jun 2010 10:20:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Jun 2010 10:20:18 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 08 12:20:17 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OLvuq-0005vt-5w for gctc-ntg-context-518@m.gmane.org; Tue, 08 Jun 2010 12:20:16 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 10BFEC9CEA; Tue, 8 Jun 2010 12:20:15 +0200 (CEST) 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 g4vxBi6Seo8H; Tue, 8 Jun 2010 12:20:12 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0339CC9C0E; Tue, 8 Jun 2010 12:20:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6E4DAC9C0E for ; Tue, 8 Jun 2010 12:20:10 +0200 (CEST) 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 q4UYahuJVJ2i for ; Tue, 8 Jun 2010 12:20:08 +0200 (CEST) Original-Received: from smtp-vbr1.xs4all.nl (smtp-vbr1.xs4all.nl [194.109.24.21]) by balder.ntg.nl (Postfix) with ESMTP id 2105CC9BAE for ; Tue, 8 Jun 2010 12:20:07 +0200 (CEST) Original-Received: from [192.168.178.23] (a82-95-102-36.adsl.xs4all.nl [82.95.102.36]) (authenticated bits=0) by smtp-vbr1.xs4all.nl (8.13.8/8.13.8) with ESMTP id o58AK8dj033674 for ; Tue, 8 Jun 2010 12:20:08 +0200 (CEST) (envelope-from havdmeer@xs4all.nl) X-Mailer: Apple Mail (2.936) X-Virus-Scanned: by XS4ALL Virus Scanner 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:59427 Archived-At: I would like to combine the xml path search of two different levels. An example, the xml can be either case #1:
or case #2:
Now I want to process the elements from the
level and loop through them with the position function: \xmlfilter{#1}{/(a/b|b)/name/position(\the\scratchcounter)} This however does not work, I tried various path expressions, for example with * but to no avail. Is there a path expression that can select either /a/b or /b ? Hans van der Meer ___________________________________________________________________________________ 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 ___________________________________________________________________________________