From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34293 Path: news.gmane.org!not-for-mail From: Bernd Militzer Newsgroups: gmane.comp.tex.context Subject: xml problem Date: Mon, 16 Apr 2007 17:29:35 +0200 Message-ID: <4623965F.4030109@militzer.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090807060802030702010506" X-Trace: sea.gmane.org 1176737419 19126 80.91.229.12 (16 Apr 2007 15:30:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2007 15:30:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 16 17:30:12 2007 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 1HdT9Z-0000he-6C for gctc-ntg-context-518@m.gmane.org; Mon, 16 Apr 2007 17:30:05 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 156FB201F0; Mon, 16 Apr 2007 17:30:01 +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 12363-03-3; Mon, 16 Apr 2007 17:29:53 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 15CF91FF9C; Mon, 16 Apr 2007 17:29:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9514C1FF9C for ; Mon, 16 Apr 2007 17:29:51 +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 12363-03-2 for ; Mon, 16 Apr 2007 17:29:47 +0200 (CEST) Original-Received: from new.militzer.net (new.militzer.net [81.169.143.226]) by ronja.ntg.nl (Postfix) with ESMTP id 78C421FE7F for ; Mon, 16 Apr 2007 17:29:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by new.militzer.net (Postfix) with ESMTP id 2E3B31840B2 for ; Mon, 16 Apr 2007 17:29:47 +0200 (CEST) Original-Received: from new.militzer.net ([127.0.0.1]) by localhost (new [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28758-09 for ; Mon, 16 Apr 2007 17:29:33 +0200 (CEST) Original-Received: from [192.168.192.153] (pd9e63014.dip.t-dialin.net [217.230.48.20]) by new.militzer.net (Postfix) with ESMTP id 815801840B1 for ; Mon, 16 Apr 2007 17:29:33 +0200 (CEST) User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at new.militzer.net 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:34293 Archived-At: This is a multi-part message in MIME format. --------------090807060802030702010506 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi Hans, first thanks for your help at Epen, but reading the different documents I could not find out how to define a macro to get the value of a specific element of an xml-file. Running your example I get all elements. For example: I wont to get the value of the first name for \def\getFirstName#1{{\enableXML\getvalue{person:#1}}} % what is here to change? Thanks for help again Bernd --------------090807060802030702010506 Content-Type: text/xml; x-mac-type="0"; x-mac-creator="0"; name="Data.xml" Content-Disposition: inline; filename="Data.xml" Content-Transfer-Encoding: quoted-printable =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 Militzer=20 Kai Uwe=20 Kai 21. August 1980 Krefeld 2 3 =20 =20 Militzer=20 Jan Erik=20 Jan 3. September 1981 Krefeld 2 3 =20 =20 Militzer=20 Johann Christoph Erdmann=20 Johann 27. August 1797 Unterkoskau 132 133 =20 =09 =20 Rudolph=20 Johanne Christiane Friedericke=20 Johanne 21. Juli 1804 Oberkoskau Oberm=FChle 134 135 =20 =09 =20 Militzer=20 Adam=20 Adam 16. November 1670 Unterkoskau 4224 4225 =20 =09 =20 Militzer=20 Johannes=20 Hans 4. Januar 1630 Unterkoskau 8448 8449 =20 --------------090807060802030702010506 Content-Type: application/x-tex; x-mac-type="0"; x-mac-creator="0"; name="getData.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="getData.tex" %ConTeXt % % % % \defineXMLentity[nmacron]{\={n}} \defineXMLentity[mmacron]{\={m}} % % \defineXMLargument[person][pid=]{\setgvalue{person:\XMLop{pid}}} \startsetups record % \defineXMLgsave[Fam] % \defineXMLgsave[Vor] % \defineXMLgsave[Ruf] % \defineXMLgsave[Geb] % \defineXMLgsave[GebOrt] % \defineXMLgsave[Vater] % \defineXMLgsave[Mutter] % % \XMLflush{Fam} %\space \XMLflush{Vor}\space \XMLflush{Geb} \stopsetups \starttext \def\Fetch#1{(#1) {\enableXML\getvalue{person:#1}}} % geht, jedoch alle Datenfelder \processXMLfilegrouped{Data.xml} Die Personen in der Datenbank \blank \Fetch{1a}\crlf \Fetch{1c}\crlf \Fetch{66}\crlf \Fetch{67} \crlf \Fetch{2112}\crlf \Fetch{4224}\crlf \stoptext --------------090807060802030702010506 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --------------090807060802030702010506--