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
>   <url>ONE</url> <url href="foo">TWO</url> <url>TREE</url>

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 | [EMAIL PROTECTED]
                       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
-------------------------------------------------------------------------

Reply via email to