From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71329 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: xml processing in lua Date: Mon, 26 Sep 2011 21:14:00 +0200 Message-ID: <3B5E2774-D859-42D9-A174-14301B1E95CD@googlemail.com> References: <4E80CB15.4070709@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1317064463 12075 80.91.229.12 (26 Sep 2011 19:14:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 26 Sep 2011 19:14:23 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 26 21:14:19 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 1R8Gd6-0003rA-64 for gctc-ntg-context-518@m.gmane.org; Mon, 26 Sep 2011 21:14:16 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 91371CAFD7; Mon, 26 Sep 2011 21:14: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 Zy5bst2v-sNb; Mon, 26 Sep 2011 21:14:11 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C5B88CAFCD; Mon, 26 Sep 2011 21:14:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0445DCAFCD for ; Mon, 26 Sep 2011 21:14: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 Gxu8cdSoVSPl for ; Mon, 26 Sep 2011 21:14:08 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 1C26BCAFCB for ; Mon, 26 Sep 2011 21:14:08 +0200 (CEST) Original-Received: from mail-ey0-f169.google.com (mail-ey0-f169.google.com [209.85.215.169]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p8QJE7o2012009 for ; Mon, 26 Sep 2011 21:14:07 +0200 Original-Received: by eye13 with SMTP id 13so5030692eye.14 for ; Mon, 26 Sep 2011 12:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=9+DLvIYwK13fGa6qKPkRtnL8jcJMnXJ8vUripg6x/eQ=; b=GO879XK+LT6LKDffuu0Mino6VGYqC5OklH4sjyEu67JyrJgMK3EXEyTM87q/vWfJ/9 OLBFPwBPHHkiCOiLSA4tW57R8Q+4eUgjpufQvrOtiRH1bkaegUd2qxI3xF7M5Gj0q3Jf SLynOnrL4U7MrTFpyAC82zif58haZVSG4PwWY= Original-Received: by 10.213.13.68 with SMTP id b4mr1247494eba.92.1317064447003; Mon, 26 Sep 2011 12:14:07 -0700 (PDT) Original-Received: from [192.168.2.31] (p5B0EE84F.dip.t-dialin.net. [91.14.232.79]) by mx.google.com with ESMTPS id d59sm63066785eea.3.2011.09.26.12.14.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Sep 2011 12:14:06 -0700 (PDT) In-Reply-To: <4E80CB15.4070709@uni-bonn.de> X-Mailer: Apple Mail (2.1244.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.215.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08FBve74o - 605341632a00 - 20110926 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:71329 Archived-At: Am 26.09.2011 um 20:57 schrieb Thomas A. Schmitz: > Hi all, > > after boring people with xml processing in TeX at the meeting in Bassenge, I'm looking for new challenges and am trying my hand at processing xml in lua. But so far, even the simplest things escape me. Here's an example: > > \startbuffer[test] > > One > Two > > \stopbuffer > > \startxmlsetups xml:setups > \xmlsetsetup{main}{a|b|c}{xml:*} > \stopxmlsetups > > \xmlregistersetup{xml:setups} > > % \startxmlsetups xml:a > % \xmltext{#1}{/c} > % \stopxmlsetups > > \startxmlsetups xml:a > \startluacode > context(xml.text("#1", "/b")) context(lxml.text("#1","/b")) or context.xmltext("#1","/b") Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________