From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38937 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Nested XML environments with MkIV Date: Sat, 2 Feb 2008 19:42:14 +0100 Message-ID: <20080202194214.0bb5f191.schuster.wolfgang@googlemail.com> 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: ger.gmane.org 1201977824 4122 80.91.229.12 (2 Feb 2008 18:43:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Feb 2008 18:43:44 +0000 (UTC) To: ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 02 19:44:04 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 1JLNLQ-00007l-M5 for gctc-ntg-context-518@m.gmane.org; Sat, 02 Feb 2008 19:44:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 970F21FB72; Sat, 2 Feb 2008 19:43:35 +0100 (CET) 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 22789-02-2; Sat, 2 Feb 2008 19:43:00 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 73DCE1FB3C; Sat, 2 Feb 2008 19:43:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 71DB11FB3C for ; Sat, 2 Feb 2008 19:42:58 +0100 (CET) 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 19707-04-4 for ; Sat, 2 Feb 2008 19:42:25 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by ronja.ntg.nl (Postfix) with ESMTP id 1DAC01FB39 for ; Sat, 2 Feb 2008 19:42:25 +0100 (CET) Original-Received: by fg-out-1718.google.com with SMTP id e12so1473624fga.8 for ; Sat, 02 Feb 2008 10:42:24 -0800 (PST) Original-Received: by 10.82.177.3 with SMTP id z3mr9111717bue.35.1201977744646; Sat, 02 Feb 2008 10:42:24 -0800 (PST) Original-Received: from rover ( [84.149.108.162]) by mx.google.com with ESMTPS id v23sm2706974fkd.1.2008.02.02.10.42.16 (version=SSLv3 cipher=OTHER); Sat, 02 Feb 2008 10:42:17 -0800 (PST) X-Mailer: Sylpheed 2.4.8 (GTK+ 2.10.14; i686-pc-mingw32) 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:38937 Archived-At: Hi, I tried to get the following example with ConTeXt's old XML macros in MkII with the new setup mechanism from MkIV. \defineXMLenvironment [section] {Section:\par} {} \defineXMLenvironment [p] \par \par \startbuffer

text text

text text

text text

\stopbuffer \starttext \processXMLbuffer \stoptext My code for MkIV looks like: \startxmlsetups xml:mysetups \xmlsetsetup{\xmldocument}{section}{xml:section} \xmlsetsetup{\xmldocument}{p}{xml:paragraph} \stopxmlsetups \xmlregistersetup{xml:mysetups} \startxmlsetups xml:paragraph \xmlflush{#1}\par \stopxmlsetups \startxmlsetups xml:section Section:\par \xmlflush{#1} \stopxmlsetups \startbuffer[section]

text text

text text

text text

\stopbuffer \starttext \xmlprocessbuffer{main}{section}{} \stoptext What I want is to insert or execute a macro at the begin of every new section environment (I used the text "Section:") and this work fine with XML definition but not with setups, only the first envionment is executed and the rest is only read and flushed. 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 ___________________________________________________________________________________