From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/23955 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Re: Re: ConTeXt, XML, multiple attributes evaluation Date: Wed, 30 Nov 2005 09:36:25 +0100 Message-ID: <438D6489.4020900@wxs.nl> References: <438C052D.3080308@elvenkind.com> <438CC4F0.707@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; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133346297 12548 80.91.229.2 (30 Nov 2005 10:24:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 10:24:57 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 30 11:24:22 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 1EhNS4-0001et-Mv for gctc-ntg-context-518@m.gmane.org; Wed, 30 Nov 2005 09:36:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5AA1912804; Wed, 30 Nov 2005 09:36:32 +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 02570-09-3; Wed, 30 Nov 2005 09:36:29 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F13C1127B2; Wed, 30 Nov 2005 09:36:28 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 240F7127B2 for ; Wed, 30 Nov 2005 09:36: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 02570-09-2 for ; Wed, 30 Nov 2005 09:36:26 +0100 (CET) Original-Received: from controller-1 (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with ESMTP id 0E00E127A6 for ; Wed, 30 Nov 2005 09:36:25 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 5649 for multiple; Wed, 30 Nov 2005 09:41:28 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: graumann@its.caltech.edu, mailing list for ConTeXt users In-Reply-To: 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:23955 Archived-At: 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