From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81053 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XML Lua engine in ConTeXt Date: Tue, 05 Mar 2013 11:54:42 +0100 Message-ID: <5135CEF2.6070909@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1362480924 29958 80.91.229.3 (5 Mar 2013 10:55:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Mar 2013 10:55:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 05 11:55:44 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCpX5-000746-4p for gctc-ntg-context-518@m.gmane.org; Tue, 05 Mar 2013 11:55:43 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 64D6D101E8; Tue, 5 Mar 2013 11:55:21 +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 qM8VfSHfteNJ; Tue, 5 Mar 2013 11:55:15 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 29A68101E9; Tue, 5 Mar 2013 11:55:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F41E6101E9 for ; Tue, 5 Mar 2013 11:55:13 +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 M1L1MNKhAtVU for ; Tue, 5 Mar 2013 11:55:08 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 606D6101E8 for ; Tue, 5 Mar 2013 11:55:08 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r25At7Qq014904 for ; Tue, 5 Mar 2013 11:55:07 +0100 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 pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 10058-1713362 for multiple; Tue, 05 Mar 2013 11:54:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; latitude=52.5000; longitude=5.7500; http://maps.google.com/maps?q=52.5000,5.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJ7KT76W - 531d5984d747 - 20130305 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81053 Archived-At: On 3/5/2013 10:59 AM, Proch=E1zka Luk=E1=B9 Ing. - Pontex s. r. o. wrote: > Hello, > > which XML processing Lua engine is used by ConTeXt? > > There are more XML processors developed for Lua - LuaXML, LuaExpat etc. > > Does ConTeXt use one of these or another, or its own - a built-in one? Its own (1) because there was none and (2) because we want full control = over the two-way interface. > As I'm processing XML tables with pure Lua, too, I'd like to use only > one engine in pure Lua scripts and within ConTeXt; > I believe it could be possible. Just use the one that is built in context mkiv. You can load the xml = parser code in regular Lua code that you write. Here is the most recent = list of reasonable defaults: "l-lua.lua", "l-lpeg.lua", "l-function.lua", "l-string.lua", "l-table.lua", "l-io.lua", "l-number.lua", "l-set.lua", "l-os.lua", "l-file.lua", -- limited functionality when no lfs "l-md5.lua", -- not loaded when no md5 library "l-url.lua", "l-dir.lua", -- limited functionality when no lfs "l-boolean.lua", "l-unicode.lua", "l-math.lua", "util-tab.lua", "util-sto.lua", "util-str.lua", "util-mrg.lua", "util-prs.lua", "trac-inf.lua", "trac-set.lua", "trac-log.lua", "util-tpl.lua", "util-env.lua", "lxml-tab.lua", "lxml-lpt.lua", "lxml-mis.lua", "lxml-aux.lua", "lxml-xml.lua", If you cannot use mtxrun --script for some reason, you can = load these files explicitly. In one of the upcoming betas I'll add a = script that I use for some months now that permits you to build a merged = lib out of these (and more) that then can be includes with one require = call (and put alongside whatever code you use). The advantage is that = you then have a sort of snapshot. (I use that approach in for instance = web services.) Think of: lua mtxlibs.lua --selfmerge my-used-libs.lua trac-lmx util-jsn = util-sql util-sql-imp-client util-sql-imp-library util-sql-sessions = util-sql-tickets util-sql-loggers util-sql-users util-sql-logins This produces my-used-libs.lua which on top of the list above adds some = more to it. You then only need to require this one lib and can avoid = dependencies, path mess, etc. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________