From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/42424 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: more xml in mkiv Date: Mon, 14 Jul 2008 16:45:52 +0200 Message-ID: References: <115224fb0803250829h586fd5d3m780c81844bfb7aaf@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v926) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216046915 749 80.91.229.12 (14 Jul 2008 14:48:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2008 14:48:35 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 14 16:49:19 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KIPMT-0001O9-4D for gctc-ntg-context-518@m.gmane.org; Mon, 14 Jul 2008 16:49:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1779A1FCBB; Mon, 14 Jul 2008 16:48:12 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32478-01-7; Mon, 14 Jul 2008 16:47:24 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 232451FC0B; Mon, 14 Jul 2008 16:47:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9D1581FC0B for ; Mon, 14 Jul 2008 16:47:17 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30637-04-14 for ; Mon, 14 Jul 2008 16:46:34 +0200 (CEST) Original-Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) by ronja.ntg.nl (Postfix) with ESMTP id E9E821FC01 for ; Mon, 14 Jul 2008 16:46:16 +0200 (CEST) Original-Received: from fwd28.aul.t-online.de by mailout02.sul.t-online.de with smtp id 1KIPJf-0007MJ-03; Mon, 14 Jul 2008 16:46:15 +0200 Original-Received: from [192.168.0.2] (V8qWGEZFQhb3qGvR7HokWDCt1fvApN5QW9-92mlbdS6Od91pIlyTuJIbf6vlSiCguf@[87.178.72.56]) by fwd28.aul.t-online.de with esmtp id 1KIPJJ-12fnAO0; Mon, 14 Jul 2008 16:45:53 +0200 In-Reply-To: <115224fb0803250829h586fd5d3m780c81844bfb7aaf@mail.gmail.com> X-Mailer: Apple Mail (2.926) X-ID: V8qWGEZFQhb3qGvR7HokWDCt1fvApN5QW9-92mlbdS6Od91pIlyTuJIbf6vlSiCguf@t-dialin.net X-TOI-MSGID: 3d25f4a7-89a7-41a3-b2e3-8b1cb1ae0118 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:42424 Archived-At: Hi all, I'm resurrecting an ooooold thread and top-posting... For details, see the post below. The problem was that the content of itemizations sometimes disappeared in xml processed by mkiv. I emphasize "sometimes": now you see it, now you don't... I can't really post a minimal example that will be certain to display the effect, but I have, since May, discovered one thing: this code: A will sometimes make the A disappear. This code: A will always work correctly. So Hans, a shot in the dark: can it be that your lpeg xml parser can, under certain circumstances, have trouble with linebreaks within the xml-subtree it is trying to pick up? That would explain the mystery which had me baffled back in May. All best Thomas On Mar 25, 2008, at 4:29 PM, Wolfgang Schuster wrote: > On Mon, Mar 24, 2008 at 10:28 PM, Thomas A. Schmitz > wrote: >> Hi all, >> >> I played some more with the new mkiv xml mechanism and am beginning >> to >> see the light: some things that turned out to be very difficult (at >> least for me) with the "old" mechanism are easy now. However, I still >> have a couple of questions: >> >> 1. I have this minimal file test.xml: >> >> >> >> >> one >> >> >> two >> >> >> three >> >> >> >> >> and this minimal environment test-style.tex: >> \startxmlsetups xml:mysetups >> \xmlsetsetup{\xmldocument}{document|itemize|item}{xml:*} >> \stopxmlsetups >> >> \xmlregistersetup{xml:mysetups} >> >> \startxmlsetups xml:document >> \xmlflush{#1} >> \stopxmlsetups >> >> \startxmlsetups xml:itemize >> \startitemize >> \xmlflush{#1} >> \stopitemize >> \stopxmlsetups >> >> \startxmlsetups xml:item >> \item \xmlflush{#1} >> \stopxmlsetups >> >> \starttext >> \xmlprocess{main}{\inputfilename}{} >> \stoptext >> >> When I run texexec --lua --env=test-style test.xml, I get output only >> for item "three," not for one and two. What am I doing wrong? >> >> 2. In every run, I get this warning: >> >> TeXUtil | check loading of file 'test-style', begin/end problem >> >> I don't see anything wrong with my files, though. Is this harmless? >> >> >> 3. I have a structure like this to get numbered labels: >> >> >> >> >> blahblah >> >> > > you could try something like > > \startxmlsetups xml:lemma > \startlemma{\xmlfirst{#1}{label}} > \ignorespaces\xmlfirst{#1}{content}\removeunwatedspaces > \stoplemma > \stopxmlsetups > > 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________