Hi,

> I need something like a \XMLeraseAttribute{url}{href}.

Ok. I found a solution:

\unprotect
\def\XMLeraseattr#1#2{\@EA\let\csname\@@XMLvariable:#1:#2\endcsname\undefined}
\protect

\setupcolors[state=start]
\setupinteraction[state=start, color=blue]

\def\Url#1{%
    \useURL[c][#1]%
    \useURL[h][\XMLpar{url}{href}{#1}]%
    \goto{\url[c]}[url(h)]%
    \XMLeraseattr{url}{href}%
}
\defineXMLargument[url]\Url

\starttext
\startXMLdata
<url>ONE</url>
<url href="foo">TWO</url>
<url>TREE</url>
\stopXMLdata
\stoptext
-- 
This above all: To thine own self be true / And it must follow as
the night the day / Thou canst not then be false to any man.

Reply via email to