From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75107 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: define macro from xml-attribute Date: Fri, 16 Mar 2012 09:25:35 +0000 Message-ID: <4F78EFF9-4F0F-4D34-8388-77477911CA19@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1331889945 25009 80.91.229.3 (16 Mar 2012 09:25:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Mar 2012 09:25:45 +0000 (UTC) To: ConTeXt NTG Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 16 10:25:43 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S8TPq-0004nc-Tn for gctc-ntg-context-518@m.gmane.org; Fri, 16 Mar 2012 10:25:43 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E1EA2101F2; Fri, 16 Mar 2012 10:25:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xyYJ0kkNnY2b; Fri, 16 Mar 2012 10:25:37 +0100 (CET) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9C1AA101DF; Fri, 16 Mar 2012 10:25:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B7F78101DF for ; Fri, 16 Mar 2012 10:25:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fuQYG6pu-lBB for ; Fri, 16 Mar 2012 10:25:36 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id 00A4810193 for ; Fri, 16 Mar 2012 10:25:35 +0100 (CET) Original-Received: from holleman.uva.nl (holleman.uva.nl [146.50.108.228]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q2G9V4oE003084 for ; Fri, 16 Mar 2012 10:31:04 +0100 Original-Received: from ketelaar.uva.nl ([fe80::cc61:4c73:c438:df97]) by holleman.uva.nl ([146.50.108.228]) with mapi id 14.01.0355.002; Fri, 16 Mar 2012 10:25:35 +0100 Thread-Topic: define macro from xml-attribute Thread-Index: AQHNA1a9myA9/48wHUuYQa5iQFSPNQ== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] Content-ID: <96170BFF5763714F88470C0FF526FF69@uva.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.228; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0IGK9v4uF - 71f353e08766 - 20120316 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 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:75107 Archived-At: I would like to accomplish the following in xml processing. and then define the attribute value as a TeX macro. For example, to use this in font switching: Doing this in the following manner does not work: \startxmlsetups namespace \def\macro{\xmlattdef{#1}{macro}{\empty}} \stopxmlsetups The contents evaluates not to a working macro. Something with catcodes, I presume, but I do not how to do it properly. Preferably I would like to see \meaning\macro evaluate to: \switchtobodyfont[helvetica]. Can someone enlighten me? Hans van der Meer ___________________________________________________________________________________ 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 ___________________________________________________________________________________