From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73505 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: searching xml node tree Date: Sat, 31 Dec 2011 15:45:33 +0000 Message-ID: <170FA172-28F7-43D0-A520-4EB56AE1B287@uva.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" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1325346361 17933 80.91.229.12 (31 Dec 2011 15:46:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2011 15:46:01 +0000 (UTC) To: ConTeXt NTG Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 31 16:45:54 2011 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 1Rh184-0000ey-IM for gctc-ntg-context-518@m.gmane.org; Sat, 31 Dec 2011 16:45:52 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 150DCCB1C5; Sat, 31 Dec 2011 16:45:51 +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 KPPBvTe-aGet; Sat, 31 Dec 2011 16:45:48 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3DB85CB1BF; Sat, 31 Dec 2011 16:45:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 77748CB1BF for ; Sat, 31 Dec 2011 16:45:46 +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 lR5DU0mVWluV for ; Sat, 31 Dec 2011 16:45:35 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 88AE2CB1BC for ; Sat, 31 Dec 2011 16:45:35 +0100 (CET) Original-Received: from holleman.uva.nl (holleman.uva.nl [146.50.108.228]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBVFjYXm008631 for ; Sat, 31 Dec 2011 16:45:34 +0100 Original-Received: from vanthoff.uva.nl (146.50.108.242) by holleman.uva.nl (146.50.108.228) with Microsoft SMTP Server (TLS) id 14.1.355.2; Sat, 31 Dec 2011 16:45:34 +0100 Original-Received: from ketelaar.uva.nl ([fe80::cc61:4c73:c438:df97]) by vanthoff.uva.nl ([::1]) with mapi id 14.01.0339.001; Sat, 31 Dec 2011 16:45:34 +0100 Thread-Topic: searching xml node tree Thread-Index: AQHMx9M7AkFiXo1GIUCphElG1/p/6w== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] Content-ID: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.228; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03GfPJyvH - e2360960c849 - 20111231 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:73505 Archived-At: In the processing of xml data path expressions like a/(b|c)/*/d etc. can be used. However, I have a node that can be present inside every node of the tree. One method to collect these all together is bij successive calls: \xmlall{#1}{/node}, \xmlall{#1}{/*/node}, \xmlall{#1}{/*/*/node}, etc. But that fails if the tree is deeper than foreseen. I tried recursive searching within the node-setup-processor by calling \xmlall{#1}{../*/node} but either this fails or I am not doing it the right way. Any ideas? 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 ___________________________________________________________________________________