From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65016 Path: news.gmane.org!not-for-mail From: Achim Jander Newsgroups: gmane.comp.tex.context Subject: Re: Fwd: Re: xml-processing: missing or ungrouped '=' Date: Sat, 08 Jan 2011 13:39:07 +0100 Message-ID: <4D285AEB.5080009@jander.de> References: <4D283A80.9090909@jander.de> <4D284759.6030802@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294490390 29153 80.91.229.12 (8 Jan 2011 12:39:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 8 Jan 2011 12:39:50 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 08 13:39:46 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PbY5B-0001jc-W2 for gctc-ntg-context-518@m.gmane.org; Sat, 08 Jan 2011 13:39:46 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 50E2DCA993; Sat, 8 Jan 2011 13:39:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gKTq1VmOAHGO; Sat, 8 Jan 2011 13:39:42 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 784A9CA972; Sat, 8 Jan 2011 13:39:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 262E0CA972 for ; Sat, 8 Jan 2011 13:39:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WZB7o4cyar01 for ; Sat, 8 Jan 2011 13:39:38 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id D8A7DCA968 for ; Sat, 8 Jan 2011 13:39:38 +0100 (CET) Original-Received: from p15188155.pureserver.info (p15188155.pureserver.info [212.227.83.96]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p08CdbWi027785 for ; Sat, 8 Jan 2011 13:39:38 +0100 Original-Received: (qmail 25250 invoked from network); 8 Jan 2011 13:39:37 +0100 Original-Received: from krlh-5f72d379.pool.mediaways.net (HELO ?192.168.1.43?) (95.114.211.121) by p15188155.pureserver.info with SMTP; 8 Jan 2011 13:39:37 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: <4D284759.6030802@wxs.nl> X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=212.227.83.96; country=DE; region=01; city=Karlsruhe; latitude=49.0047; longitude=8.3858; http://maps.google.com/maps?q=49.0047,8.3858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05DR0DC3v - 4e997429d728 - 20110108 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:65016 Archived-At: Hi Hans, sorry, i'll try to make it more clear: \startbuffer[test] some text more text more text <num>333</num>some text more text more text \stopbuffer \startxmlsetups xml:testsetups \xmlsetsetup{\xmldocument}{a|b|title}{xml:*} \xmlsetsetup{\xmldocument}{num}{-} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:a \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:b \startparagraph \xmlflush{#1} \stopparagraph \stopxmlsetups \startxmlsetups xml:ueberForceFlush \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:getOwnNumber \xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{} \stopxmlsetups \startxmlsetups xml:title \startchapter[ %\xmldoifelse{#1}{/num}{ownnumber=\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{number=no} title={Testcase} ] \xmlflush{#1} \stopchapter \stopxmlsetups \setupheader[chapter][ownnumber=yes] \starttext \xmlprocessbuffer{main}{test}{} \stoptext The relevant part is the line I've commented out because of the error. In the setup xml:title I start the chapter. If the title comes with an number-element I want to set ownnumber=..., but if they have no numbers, I want to set number=no But this approach seems not to work. In my real application the problem is, that I have a more complex setting of defining the title=, ownnumber= etc attributes, but equal in different (up to 15) hierarchies. So I tried to call inside the one setup another setup which should do the work, but also without success (this was my original example). The plan was to call that setup from each hierarchy to avoid redundancy It was like \startxmlsetups xml:title \startchapter[ %---> here call another template to set title= ownnumber= etc. ] \xmlflush{#1} \stopchapter \stopxmlsetups Here again the complete example: \startbuffer[test] some text more text more text <num>333</num>some text more text more text \stopbuffer \startxmlsetups xml:testsetups \xmlsetsetup{\xmldocument}{a|b|title}{xml:*} \xmlsetsetup{\xmldocument}{num}{-} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:a \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:b \startparagraph \xmlflush{#1} \stopparagraph \stopxmlsetups \startxmlsetups xml:ueberForceFlush \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:splitHeader %works not number=\xmldoifelse{#1}{/num}{yes}{no}, ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{}, title={\xmlflush{#1}}, \stopxmlsetups \startxmlsetups xml:title \startchapter[ %trying to call another template to set %title= %ownnumber= %and other stuff... \xmlcommand{#1}{.}{xml:splitHeader} %number=\xmldoifelse{#1}{/num}{yes}{no}, %works %ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{},%works %title={\xmlflush{#1}},%works ] \xmlflush{#1} \stopchapter \stopxmlsetups \setupheader[chapter][ownnumber=yes] \starttext \xmlprocessbuffer{main}{test}{} \stoptext Thanks you and have a nice Weekend Achim Am 08.01.2011 12:15, schrieb Hans Hagen: > On 8-1-2011 11:20, Achim Jander wrote: >> >> Am 07.01.2011 22:52, schrieb Hans Hagen: >>> On 7-1-2011 7:04, Achim Jander wrote: >>> >>>> \startxmlsetups xml:title >>>> \startchapter[ >>>> \xmlcommand{#1}{.}{xml:splitHeader} >>> >>> title=... >> Thanks. >> So it seems not to be possible, to have the whatever= part inside an >> xmlcommand? >> I even tried things like >> >> \xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{ownnumber=123}}{number=no} >> >> to set either ownnumber or number but with the same error > > the \xmlcommand is completely unrelated to (say) \startchapter > > \xmlcommand{node number}{lpath expression}{setup id} > > so i have no clue what you want to do with it, unless ownnumber=123 is > the name of a setup > > Hans > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________