From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25396 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: xml and buffers Date: Thu, 19 Jan 2006 17:55:22 +0100 Message-ID: <43CFC47A.3040209@wxs.nl> References: <20060119182329.GB25283@zapata.cryptyx.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1137689828 11161 80.91.229.2 (19 Jan 2006 16:57:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 16:57:08 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 19 17:56:58 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1Ezd4K-0001EW-Aw for gctc-ntg-context-518@m.gmane.org; Thu, 19 Jan 2006 17:55:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E986B1287C; Thu, 19 Jan 2006 17:55:27 +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 02758-03-4; Thu, 19 Jan 2006 17:55:25 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B541F127B5; Thu, 19 Jan 2006 17:55:25 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 23A67127B5 for ; Thu, 19 Jan 2006 17:55:25 +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 02758-03-3 for ; Thu, 19 Jan 2006 17:55:24 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id 1FB8E127B0 for ; Thu, 19 Jan 2006 17:55:23 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 1578 for ; Thu, 19 Jan 2006 12:06:38 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <20060119182329.GB25283@zapata.cryptyx.com> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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:25396 Archived-At: Junod Antoine wrote: >Hello gurus,=20 > >I'm a bit into trouble wih buffers and xml parsing. Here is my problem: > >I've got a .xhtml with the following lines: > > [...] > > > [...] > Auction: document d'analyse > [...] > >I'm trying to store the content of the meta tag in a buffer, one per >meta tag, (ie "G=EF=BF=BDnie Logiciel" in buffer course_name, "23 d=EF=BF= =BDcembre >2005" in buffer date) to use these buffers when I meet the title tag: > > \XMLifequalelse{meta}{name}{course_name} > {\startbuffer[course_name]\XMLpar{meta}{content}{}\stopbuffer}= {} > \XMLifequalelse{meta}{name}{date} > {\startbuffer[date]\XMLpar{meta}{content}{}\stopbuffer}{} > \defineXMLenvironment [title] {\startstandardmakeup > \getbuffer[course_name] > \getbuffer[date]}{\stopstandardmakeu= p} > >But it does not print anything else than the title. > =20 > buffers serve a different purpose and are part if a text flow=20 \starttext \defineXMLsingular [meta] [name=3D,content=3D] {\setevariables[document:meta][\XMLop{name}=3D\XMLop{content}]} \defineXMLenvironment [title] {} {\startstandardmakeup \getvariable{document:meta}{course_name} \endgraf \getvariable{document:meta}{date} \endgraf \stopstandardmakeup} \startXMLdata \stopXMLdata With a little extension (i'll add it) we can prevent unwanted expansion:=20 \unprotected \def\setvalueXMLpar#1#2#3% {\@EA\let\csname#1\@EA\endcsname \csname\ifcsname\@@XMLvariable:#2:#3\endcsname \@@XMLvariable:#2:#3\else\s!empty\fi\endcsname} \defineXMLsingular [meta] [name=3D,content=3D] {\setvalueXMLpar{document:meta:\XMLop{name}}{meta}{content}} \defineXMLenvironment [title] {} {\startstandardmakeup \getvalue{document:meta:course_name} \endgraf \getvalue{document:meta:date} \endgraf \stopstandardmakeup} \startXMLdata <meta name=3D"course_name" content=3D"Genie Logiciel" /> <meta name=3D"date" content=3D"23 decembre 2005" /> <title/> \stopXMLdata \stoptext From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25392 Path: news.gmane.org!not-for-mail From: Junod Antoine <toto@tots-ns.net> Newsgroups: gmane.comp.tex.context Subject: xml and buffers Date: Thu, 19 Jan 2006 19:23:29 +0100 Message-ID: <20060119182329.GB25283@zapata.cryptyx.com> Reply-To: mailing list for ConTeXt users <ntg-context@ntg.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1137687860 2513 80.91.229.2 (19 Jan 2006 16:24:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 16:24:20 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 19 17:24:15 2006 Return-path: <ntg-context-bounces@ntg.nl> 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 ciao.gmane.org with esmtp (Exim 4.43) id 1EzcZV-0000d4-0i for gctc-ntg-context-518@m.gmane.org; Thu, 19 Jan 2006 17:23:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BD3ED12885; Thu, 19 Jan 2006 17:23:36 +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 02150-05-5; Thu, 19 Jan 2006 17:23:32 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 43691127B0; Thu, 19 Jan 2006 17:23:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 463F0127B0 for <ntg-context@ntg.nl>; Thu, 19 Jan 2006 17:23:31 +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 02150-05-4 for <ntg-context@ntg.nl>; Thu, 19 Jan 2006 17:23:30 +0100 (CET) Original-Received: from zapata.tots-ns.net (zapata.tots-ns.net [213.239.193.37]) by ronja.ntg.nl (Postfix) with SMTP id 6F45F12784 for <ntg-context@ntg.nl>; Thu, 19 Jan 2006 17:23:29 +0100 (CET) Original-Received: (qmail 25316 invoked by uid 1000); 19 Jan 2006 19:23:29 +0100 Original-To: ntg-context@ntg.nl Content-Disposition: inline User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users <ntg-context.ntg.nl> List-Unsubscribe: <http://www.ntg.nl/mailman/listinfo/ntg-context>, <mailto:ntg-context-request@ntg.nl?subject=unsubscribe> List-Archive: <http://www.ntg.nl/pipermail/ntg-context> List-Post: <mailto:ntg-context@ntg.nl> List-Help: <mailto:ntg-context-request@ntg.nl?subject=help> List-Subscribe: <http://www.ntg.nl/mailman/listinfo/ntg-context>, <mailto:ntg-context-request@ntg.nl?subject=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:25392 Archived-At: <http://permalink.gmane.org/gmane.comp.tex.context/25392> Hello gurus,=20 I'm a bit into trouble wih buffers and xml parsing. Here is my problem: I've got a .xhtml with the following lines: [...] <meta name=3D"course_name" content=3D"G=E9nie Logiciel" /> <meta name=3D"date" content=3D"23 d=E9cembre 2005" /> [...] <title>Auction: document d'analyse [...] I'm trying to store the content of the meta tag in a buffer, one per meta tag, (ie "G=E9nie Logiciel" in buffer course_name, "23 d=E9cembre 2005" in buffer date) to use these buffers when I meet the title tag: \XMLifequalelse{meta}{name}{course_name} {\startbuffer[course_name]\XMLpar{meta}{content}{}\stopbuffer}{= } \XMLifequalelse{meta}{name}{date} {\startbuffer[date]\XMLpar{meta}{content}{}\stopbuffer}{} \defineXMLenvironment [title] {\startstandardmakeup \getbuffer[course_name] \getbuffer[date]}{\stopstandardmakeup= } But it does not print anything else than the title. Any idea? Thanks a lot for you help! -AJ=20 From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25422 Path: news.gmane.org!not-for-mail From: Junod Antoine Newsgroups: gmane.comp.tex.context Subject: Re: xml and buffers Date: Fri, 20 Jan 2006 08:28:59 +0100 Message-ID: <20060120072859.GC27110@zapata.cryptyx.com> References: <20060119182329.GB25283@zapata.cryptyx.com> <43CFC47A.3040209@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1137742290 23987 80.91.229.2 (20 Jan 2006 07:31:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2006 07:31:30 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 20 08:31:29 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1Ezqk3-00031C-1R for gctc-ntg-context-518@m.gmane.org; Fri, 20 Jan 2006 08:31:27 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9F01212837; Fri, 20 Jan 2006 08:31:26 +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 16183-02; Fri, 20 Jan 2006 08:31:26 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0A20812831; Fri, 20 Jan 2006 08:29:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C396B12831 for ; Fri, 20 Jan 2006 08:29:00 +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 16183-01 for ; Fri, 20 Jan 2006 08:28:59 +0100 (CET) Original-Received: from zapata.tots-ns.net (zapata.tots-ns.net [213.239.193.37]) by ronja.ntg.nl (Postfix) with SMTP id B39B512824 for ; Fri, 20 Jan 2006 08:28:59 +0100 (CET) Original-Received: (qmail 29436 invoked by uid 1000); 20 Jan 2006 08:28:59 +0100 Original-To: mailing list for ConTeXt users Content-Disposition: inline In-Reply-To: <43CFC47A.3040209@wxs.nl> User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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:25422 Archived-At: Thanks a lot!!! -AJ On Thu, Jan 19, 2006 at 05:55:22PM +0100, Hans Hagen wrote: > Junod Antoine wrote: >=20 > >Hello gurus,=20 > > > >I'm a bit into trouble wih buffers and xml parsing. Here is my problem= : > > > >I've got a .xhtml with the following lines: > > > > [...] > > > > > > [...] > > Auction: document d'analyse > > [...] > > > >I'm trying to store the content of the meta tag in a buffer, one per > >meta tag, (ie "G=EF=BF=BDnie Logiciel" in buffer course_name, "23 d=EF= =BF=BDcembre > >2005" in buffer date) to use these buffers when I meet the title tag: > > > > \XMLifequalelse{meta}{name}{course_name} > > {\startbuffer[course_name]\XMLpar{meta}{content}{}\stopbuffer= }{} > > \XMLifequalelse{meta}{name}{date} > > {\startbuffer[date]\XMLpar{meta}{content}{}\stopbuffer}{} > > \defineXMLenvironment [title] {\startstandardmakeup > > \getbuffer[course_name] > > \getbuffer[date]}{\stopstandardmake= up} > > > >But it does not print anything else than the title. > >=20 > > > buffers serve a different purpose and are part if a text flow=20 >=20 > \starttext >=20 > \defineXMLsingular > [meta] > [name=3D,content=3D] > {\setevariables[document:meta][\XMLop{name}=3D\XMLop{content}]} >=20 > \defineXMLenvironment > [title] > {} > {\startstandardmakeup > \getvariable{document:meta}{course_name} \endgraf > \getvariable{document:meta}{date} \endgraf > \stopstandardmakeup} >=20 > \startXMLdata > > >=20 > > \stopXMLdata >=20 > With a little extension (i'll add it) we can prevent unwanted expansion= :=20 >=20 > \unprotected \def\setvalueXMLpar#1#2#3% > {\@EA\let\csname#1\@EA\endcsname > \csname\ifcsname\@@XMLvariable:#2:#3\endcsname > \@@XMLvariable:#2:#3\else\s!empty\fi\endcsname} >=20 > \defineXMLsingular > [meta] > [name=3D,content=3D] > {\setvalueXMLpar{document:meta:\XMLop{name}}{meta}{content}} >=20 > \defineXMLenvironment > [title] > {} > {\startstandardmakeup > \getvalue{document:meta:course_name} \endgraf > \getvalue{document:meta:date} \endgraf > \stopstandardmakeup} >=20 > \startXMLdata > <meta name=3D"course_name" content=3D"Genie Logiciel" /> > <meta name=3D"date" content=3D"23 decembre 2005" /> >=20 > <title/> > \stopXMLdata >=20 >=20 > \stoptext >=20 >=20 >=20 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25450 Path: news.gmane.org!not-for-mail From: Junod Antoine <toto@tots-ns.net> Newsgroups: gmane.comp.tex.context Subject: Re: xml and buffers Date: Fri, 20 Jan 2006 20:33:39 +0100 Message-ID: <20060120193339.GA19537@zapata.cryptyx.com> References: <20060119182329.GB25283@zapata.cryptyx.com> <43CFC47A.3040209@wxs.nl> Reply-To: mailing list for ConTeXt users <ntg-context@ntg.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137785663 17770 80.91.229.2 (20 Jan 2006 19:34:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2006 19:34:23 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 20 20:34:12 2006 Return-path: <ntg-context-bounces@ntg.nl> 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 ciao.gmane.org with esmtp (Exim 4.43) id 1F0219-0001d7-ML for gctc-ntg-context-518@m.gmane.org; Fri, 20 Jan 2006 20:33:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CE45B12897; Fri, 20 Jan 2006 20:33:50 +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 25225-03; Fri, 20 Jan 2006 20:33:48 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1C1DD127DB; Fri, 20 Jan 2006 20:33:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AFDE3127DB for <ntg-context@ntg.nl>; Fri, 20 Jan 2006 20:33:46 +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 25226-02 for <ntg-context@ntg.nl>; Fri, 20 Jan 2006 20:33:45 +0100 (CET) Original-Received: from zapata.tots-ns.net (zapata.tots-ns.net [213.239.193.37]) by ronja.ntg.nl (Postfix) with SMTP id BE6E11277C for <ntg-context@ntg.nl>; Fri, 20 Jan 2006 20:33:45 +0100 (CET) Original-Received: (qmail 6679 invoked by uid 1000); 20 Jan 2006 20:33:39 +0100 Original-To: mailing list for ConTeXt users <ntg-context@ntg.nl> Content-Disposition: inline In-Reply-To: <43CFC47A.3040209@wxs.nl> User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users <ntg-context.ntg.nl> List-Unsubscribe: <http://www.ntg.nl/mailman/listinfo/ntg-context>, <mailto:ntg-context-request@ntg.nl?subject=unsubscribe> List-Archive: <http://www.ntg.nl/pipermail/ntg-context> List-Post: <mailto:ntg-context@ntg.nl> List-Help: <mailto:ntg-context-request@ntg.nl?subject=help> List-Subscribe: <http://www.ntg.nl/mailman/listinfo/ntg-context>, <mailto:ntg-context-request@ntg.nl?subject=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:25450 Archived-At: <http://permalink.gmane.org/gmane.comp.tex.context/25450> On Thu, Jan 19, 2006 at 05:55:22PM +0100, Hans Hagen wrote: > Junod Antoine wrote: > > >Hello gurus, > > > >I'm a bit into trouble wih buffers and xml parsing. Here is my problem: > >[...] > > \defineXMLsingular > [meta] > [name=,content=] > {\setevariables[document:meta][\XMLop{name}=\XMLop{content}]} It works fine for all "normal" characters but not for accented characters. Is there a workaround? I'm using the ConTeXt version of the 16 of this month and the latest stable version of pdftex. The .log of the compilation is available here: http://zapata.tots-ns.net/analysis.log The parsed .xhtml is here: http://zapata.tots-ns.net/analysis.xhtml and the .tex is there: http://zapata.tots-ns.net/analysis.tex One more time, thanks a lot for all your help. Have a nice week-end -AJ