From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39545 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: processing xml in mkiv Date: Sun, 16 Mar 2008 14:40:38 +0100 Message-ID: References: <332CF356-5BD2-469A-969E-7F2B3A61B7F4@uni-bonn.de> <20080316120425.bcb38147.schuster.wolfgang@googlemail.com> <20080316135106.75223e86.schuster.wolfgang@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205674932 17087 80.91.229.12 (16 Mar 2008 13:42:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Mar 2008 13:42:12 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 16 14:42:40 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 1Jat8J-0006WZ-CZ for gctc-ntg-context-518@m.gmane.org; Sun, 16 Mar 2008 14:42:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 452971FBE8; Sun, 16 Mar 2008 14:42:04 +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 18986-03-2; Sun, 16 Mar 2008 14:41:24 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 635061FBC1; Sun, 16 Mar 2008 14:41:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D24A31FBAA for ; Sun, 16 Mar 2008 14:41:22 +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 18986-03 for ; Sun, 16 Mar 2008 14:40:52 +0100 (CET) Original-Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.de [194.25.134.17]) by ronja.ntg.nl (Postfix) with ESMTP id 780F91FBC6 for ; Sun, 16 Mar 2008 14:40:52 +0100 (CET) Original-Received: from fwd35.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1Jat6X-0006K5-00; Sun, 16 Mar 2008 14:40:49 +0100 Original-Received: from [192.168.0.2] (XZrzq8ZCYhe2Qbq3eIfmVI-FeCJbbXkGjq7mVfK9p255YrRextdVx2bMASZzKjUZNs@[87.178.117.33]) by fwd35.aul.t-online.de with esmtp id 1Jat6M-0zFEMS0; Sun, 16 Mar 2008 14:40:38 +0100 In-Reply-To: <20080316135106.75223e86.schuster.wolfgang@googlemail.com> X-Mailer: Apple Mail (2.919.2) X-ID: XZrzq8ZCYhe2Qbq3eIfmVI-FeCJbbXkGjq7mVfK9p255YrRextdVx2bMASZzKjUZNs@t-dialin.net X-TOI-MSGID: e0489570-f81e-4df1-a62b-8bcc67acac0f 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:39545 Archived-At: On Mar 16, 2008, at 1:51 PM, Wolfgang Schuster wrote: >> > This seems like a bug to me. This did only happen with the content in > the first line because I inserted a empty first line at the begin of > the line the xml header disappeared from the pdf, could be related to > a wrong catcode for the "<" at the beginning of the line. > OK, then this is a bug. The declaration has to be on the first line, my editor (emacs in nxml mode) doesn't even let me save the file when I introduce a first blank line before it. >>>> \xmlprocess{main}{filename.xml}{} works for me. Yes, but that would mean you need an environment for every xml file you want to process. I have now tried \xmlprocess{main}{\inputfilename}{} and this seems to work. >> \startxmlsetups xml:section >> \section{\xmlatt{#1}{section}{title}} >> \stopxmlsetups > > \startxmlsetups xml:section > \section{\xmlatt{#1}{section}{title}} > \xmlflush{#1} > \stopxmlsetups Thanks! I experimented a bit more; I think it has to be \startxmlsetups xml:section \section{\xmlatt{#1}{title}} \xmlflush{#1} \stopxmlsetups (at least, this seems to work for me...) > > >> \starttext >> \xmlprocess{main}{test.xml}{} >> \stoptext >> >> But then, I only get "invalid xml file" in the output. > > Remove the DOCDATA definition from your xml file, seems the parser has > problems with "<>" pairs inside of the DOCDATA definition. > > The following line give me a pdf file > > ]> Hmm, but this isn't valid xml? > > but the next one > > > ]> Whereas this is valid and processed without problems by mkii? Hmm, either mkiv xml handling is still a bit immature, or I'm not mature enough to use it yet :-) Thanks a lot, Wolfgang! Best 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________