From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/7641 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt XML question Date: Sat, 13 Apr 2002 20:29:48 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20020413202740.05649438@server-1> References: <5.1.0.14.1.20020412155531.02d66008@server-1> <5.1.0.14.1.20020412171245.03a0a750@server-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035398090 20890 80.91.224.250 (23 Oct 2002 18:34:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:34:50 +0000 (UTC) Cc: NTG-ConTeXt Original-To: Tobias Burnus In-Reply-To: <3CB70682.CEA1E4E@gmx.de> Xref: main.gmane.org gmane.comp.tex.context:7641 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:7641 At 06:08 PM 4/12/2002 +0200, Tobias Burnus wrote: >Hi, > > > >\def\Url[#1]#2{Href:#1 / text:#2} > > >\defineXMLargument[url]{\expanded\Url[\XMLpar{url}{href}{DEFAULT}]} > > \expanded{\somecommand stuff to expand} > > so, expanded takes an argument! and the first thing in there is not > > expanded, you forgot the {} > >%This should be ok, I think >\def\Url[#1]#2{Href:#1 / text:#2} > >% Now I have \expanded{\Url} it should work, shouldn't it? >\defineXMLargument[url]\expanded{\Url[\XMLpar{url}{href}{DEFAULT}]} > >But I still get: > Href:DEFAULT / text:ONE Href:foo / text:TWO Href:foo / text:TREE > --- should be TREE---^^^ >using > ONE TWO TREE Ah, i see: \def\TobiasURL#1{\doifsomething{#1}{URL:#1}{no url given}} \defineXMLargument[url]\TobiasURL it's element content, not an attribute! alternatively you can do an \defineXMLenvironmentsave [url] {\XMLerase{url}} {so something with \XMLdata{url} ...} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------