From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84900 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: How to debug XML processing Date: Sat, 19 Oct 2013 14:41:57 +0200 Message-ID: <52627E15.8030400@uni-bonn.de> References: <33536258.250373553.1382102560348.JavaMail.root@zimbra71-e12.priv.proxad.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1382186518 22388 80.91.229.3 (19 Oct 2013 12:41:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Oct 2013 12:41:58 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Oct 19 14:42:04 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VXVr1-0006K4-Fg for gctc-ntg-context-518@m.gmane.org; Sat, 19 Oct 2013 14:42:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CDB4D101EB; Sat, 19 Oct 2013 14:39:13 +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 kQaFQZCj7uuL; Sat, 19 Oct 2013 14:39:11 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 23FC4101E3; Sat, 19 Oct 2013 14:39:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B5D4B101E3 for ; Sat, 19 Oct 2013 14:39:09 +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 rNbcUOoZSOTU for ; Sat, 19 Oct 2013 14:39:09 +0200 (CEST) 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 EB6B0101DE for ; Sat, 19 Oct 2013 14:39:08 +0200 (CEST) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9JCfvgl005401 for ; Sat, 19 Oct 2013 14:41:57 +0200 Original-Received: from [87.178.59.114] (account tschmit1@uni-bonn.de HELO localhost.rosa) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.4.9) with ESMTPSA id 56566160 for ntg-context@ntg.nl; Sat, 19 Oct 2013 14:41:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130603 Thunderbird/17.0.6 In-Reply-To: <33536258.250373553.1382102560348.JavaMail.root@zimbra71-e12.priv.proxad.net> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=131.220.15.113; country=DE; region=07; city=Bonn; latitude=50.7333; longitude=7.1000; http://maps.google.com/maps?q=50.7333,7.1000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QKD0FVpS - 20ad83928003 - 20131019 (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:84900 Archived-At: On 10/18/2013 03:22 PM, stephleg@free.fr wrote: > Hello, > > After reading "Getting Web Content and pdf-Output from One Source" by > Thomas A. Schmitz, i'm trying to use the same method to build a PDF > file from a HTML one. But i quickly found that when something doesn't > work as expected, it's pretty hard to debug because it's hard to tell > if the error come from the environment file, the lua code or > something else. > > So are there some useful tricks to debug this kind of processing > besides the \enabletrackers command? Especially is there a way to > view the generated ConTeXt code after the macro expansion? > > Thank you. Let me put it this way: if there is a way, I don't know about it. You're right that debugging becomes more complex because there are more layers of complexity involved. OTOH: many editors can validate xml as you type (I don't know of any that does the same for TeX input), so at least you know when your source should compile. And one tip (something I have started too late): put your lua code in a separate file and call it from within your TeX environment, that way, context's error messages become more precise. Good luck! Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________