From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/26481 Path: news.gmane.org!not-for-mail From: Johannes Graumann Newsgroups: gmane.comp.tex.context Subject: Re: XML and title page rule Date: Fri, 24 Mar 2006 10:04:52 -0800 Organization: Die Guten Message-ID: References: <200603232036.43104.graumann@caltech.edu> <4423B7F0.6050700@wxs.nl> Reply-To: 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 1143227476 24938 80.91.229.2 (24 Mar 2006 19:11:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Mar 2006 19:11:16 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 24 20:11:14 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 1FMrgh-0002ak-Ts for gctc-ntg-context-518@m.gmane.org; Fri, 24 Mar 2006 20:11:07 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9A2B4127B7; Fri, 24 Mar 2006 20:11:07 +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 16069-03-7; Fri, 24 Mar 2006 20:11:02 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 742BF127A3; Fri, 24 Mar 2006 20:11:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4DD73127A3 for ; Fri, 24 Mar 2006 20:11:01 +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 16069-03-6 for ; Fri, 24 Mar 2006 20:10:59 +0100 (CET) Original-Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by ronja.ntg.nl (Postfix) with SMTP id 81D1C1276B for ; Fri, 24 Mar 2006 20:10:59 +0100 (CET) Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1FMrgO-0002Wy-BP for ntg-context@ntg.nl; Fri, 24 Mar 2006 20:10:48 +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 ; Fri, 24 Mar 2006 20:10:48 +0100 Original-Received: from johannes_graumann by iluvatar.caltech.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Mar 2006 20:10:48 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ntg-context@ntg.nl Original-Lines: 106 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: iluvatar.caltech.edu User-Agent: KNode/0.10.1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:26481 Archived-At: Thank you Soooooo much Hans! Joh Hans Hagen wrote: > Johannes Graumann wrote: >> Hello, >> >> I'm trying to make the following work: >> 1) XML: >> > authors="Autor Autor" >> title="Something &emdash; or Something else" >> subtitle="Much Fun" >> publisher="Somebody" >> /> >> 2) ConTeXt translation rule: >> \defineXMLargument[titlepage]{% >> \startstandardmakeup >> \vfil >> \bfd \setupinterlinespace Whatever \par >> \bfb \setupinterlinespace You Want \par >> \vfil >> \vfil >> \stopstandardmakeup >> } >> >> I was intending to feed the variables in through '\XMLvar', but can't get >> the start working (see 2).). I would be grateful if someone could nudge >> me into the right direction ... >> Is it even possible to have XML nodes in the variables evaluated ("")? >> If the above isn't feasible: how would I write an import rule for >> something like: >> >> Autor Autor >> Something &emdash; or <i>Something else</i> >> Much Fun >> Somebody >> >> >> Thanks for any hints - need sleep now ... >> > \starttext > > \defineXMLgrouped [i] {\em} {} > > \defineXMLcommand > [titlepage] > {\startstandardmakeup > \vfil > \bfd \setupinterlinespace \XMLop{title} \par > \bfb \setupinterlinespace \XMLop{authors} \par > \vfil > \vfil > \stopstandardmakeup} > > \startXMLdata > authors="Autor Autor 1" > title="Something &emdash; or Something else" > subtitle="Much Fun" > publisher="Somebody" > /> > \stopXMLdata > > \defineXMLenvironment > [titlepage] > {\defineXMLsave[authors] > \defineXMLsave[title] > \defineXMLsave[subtitle] > \defineXMLsave[publisher] > \startXMLignore} % ignore undefined elements > {\stopXMLignore > \startstandardmakeup > \vfil > \bfd \setupinterlinespace \XMLflush{title} \par > \bfb \setupinterlinespace \XMLflush{authors} \par > \vfil > \vfil > \stopstandardmakeup} > > \startXMLdata > > Autor Autor 2 > Something &emdash; or <i>Something else</i> > Much Fun > Somebody > > \stopXMLdata > > \stoptext > > Here is the hint - needs to be wikified now ... -) > > Hans > > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > -----------------------------------------------------------------