From: Hans Hagen <pragma@wxs.nl>
Cc: NTG-ConTeXt <ntg-context@ntg.nl>
Subject: Re: ConTeXt XML question
Date: Sat, 13 Apr 2002 20:29:48 +0200 [thread overview]
Message-ID: <5.1.0.14.1.20020413202740.05649438@server-1> (raw)
In-Reply-To: <3CB70682.CEA1E4E@gmx.de>
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 | 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
-------------------------------------------------------------------------
next prev parent reply other threads:[~2002-04-13 18:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0204121443200.28909-100000@mars.physik.fu-be rlin.de>
2002-04-12 13:56 ` Hans Hagen
2002-04-12 14:45 ` Tobias Burnus
2002-04-12 15:13 ` Hans Hagen
2002-04-12 16:08 ` Tobias Burnus
2002-04-13 18:29 ` Hans Hagen [this message]
2002-04-14 14:13 ` Tobias Burnus
2002-04-14 15:19 ` Tobias Burnus
2002-04-14 20:17 ` Hans Hagen
2002-04-14 20:15 ` Hans Hagen
2002-04-12 19:02 ` Michael Wiedmann
2002-04-13 19:11 ` Hans Hagen
2002-04-15 13:16 ` Slawek Zak
2002-04-15 9:37 ` Nigel King
2002-04-12 12:45 Tobias Burnus
-- strict thread matches above, loose matches on Subject: below --
2002-04-12 12:43 Tobias Burnus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.1.20020413202740.05649438@server-1 \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).