From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/23961 Path: news.gmane.org!not-for-mail From: Johannes Graumann Newsgroups: gmane.comp.tex.context Subject: Re: Re: Re: ConTeXt, XML, multiple attributes evaluation Date: Wed, 30 Nov 2005 12:07:33 -0800 Organization: California Institute of Technology Message-ID: References: <438C052D.3080308@elvenkind.com> <438CC4F0.707@wxs.nl> <438D6489.4020900@wxs.nl> Reply-To: graumann@its.caltech.edu, mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1133382620 14944 80.91.229.2 (30 Nov 2005 20:30:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 20:30:20 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 30 21:30:16 2005 Return-path: 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 1EhYUV-00074N-Fe for gctc-ntg-context-518@m.gmane.org; Wed, 30 Nov 2005 21:23:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9A48E127D6; Wed, 30 Nov 2005 21:23:45 +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 06620-07; Wed, 30 Nov 2005 21:23:40 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D8A48127C3; Wed, 30 Nov 2005 21:23:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 41D67127C3 for ; Wed, 30 Nov 2005 21:23:38 +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 06717-05-2 for ; Wed, 30 Nov 2005 21:23:37 +0100 (CET) Original-Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by ronja.ntg.nl (Postfix) with ESMTP id 193A8127A9 for ; Wed, 30 Nov 2005 21:23:36 +0100 (CET) Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EhYPA-0004fY-1T for ntg-context@ntg.nl; Wed, 30 Nov 2005 21:18:17 +0100 Original-Received: from iluvatar.caltech.edu ([131.215.35.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2005 21:18:16 +0100 Original-Received: from graumann by iluvatar.caltech.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2005 21:18:16 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ntg-context@ntg.nl Original-Lines: 111 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: iluvatar.caltech.edu User-Agent: KNode/0.9.2 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:23961 Archived-At: Thanks, Does what I want and opens the door for further exploration ... Joh Hans Hagen wrote: > Johannes Graumann wrote: > >>Hans, >> >>I'm just not getting it ... can't find the appropriate documentation >>maybe? http://www.pragma-ade.nl/general/manuals/example.pdf is all I got >>and e.g. "XMLop" does not show up at all in there ... >> >> > XMLop{xx} is a shortcut for \XMLpar{list}{xx}{some default} > > and as long as the current element is list that will work, so > > \defineXMLenvironment[list] > {here \XMLop{xx} works fine} > {but here the last element encountered may be another than list} > >>I tryed to get this working (just trial and error), but I just don't >>understand ... can you kick me some more into the right direction? >> >>\mapXMLvalue {list:packed} {yes} {packed} >>\mapXMLvalue {list:packed} {no} {unpacked} >>\mapXMLvalue {list:setup} {\XMLpar{list}{setup}{}} {setup} >>\defineXMLenvironment >> [list] >> [packed=no,setup=1] >> {% >> \startitemize[% >> \XMLval{list:setup}{\XMLop{setup}}{}, >> \XMLval{list:packed}{\XMLop{packed}}{} >> ]% >> }% >> {\stopitemize} >> >>Likly many a thing doesn't make sense at all - I just don't get it. >> >>Any hint is highly appreciated, >> >> > This works ok here: > > \mapXMLvalue {list:packed} {yes} {packed} > \mapXMLvalue {list:packed} {no} {unpacked} > > \defineXMLenvironment > [list] > [packed=no,setup=1] > {\startitemize[\XMLop{setup},\XMLval{list:packed}{\XMLop{packed}}{}]} > {\stopitemize} > > \defineXMLenvironment > [item] > {\item} > {\endgraf} > > \starttext > > \startXMLdata > > item one > item two > > \stopXMLdata > > \startXMLdata > > item one > item two > > \stopXMLdata > > \startXMLdata > > item one > item two > > \stopXMLdata > > \startXMLdata > > item one > item two > > \stopXMLdata > > \stoptext > > (it may help to look at the x-* files in the context/base path) > > Hans -- +----------------------------------------------------------------------+ | Johannes Graumann, Dipl. Biol. | | | | Graduate Student Tel.: ++1 (626) 395 6602 | | Deshaies Lab Fax.: ++1 (626) 395 5739 | | Department of Biology | | CALTECH, M/C 156-29 | | 1200 E. California Blvd. | | Pasadena, CA 91125 | | USA | +----------------------------------------------------------------------+