Michael Wiedmann <[EMAIL PROTECTED]> writes:

> I got the general idea, but can't get the following peace of code do
> what I want (surely due to my poor TeX/ConTeXt knowledge):
> 
> - given a peace of XML like:
> 
>   <ulink url="http://www.somewhere.net";>some site</ulink>
> 
> - I want to map this XML to ConText hyperlinks like:
> 
>   \def\makeulink#1{%
>     \useURL[one][\XMLpar{ulink}{url}{}]%
>     \goto{#1}[URL(one)]}
>   \defineXMLcommand[ulink] \makeulink

I suppose \goto can take a url directoryl, so you don't have to use
\useURL. Have you tried this?


> - only the first character of the XML element text ("s") is taken as the
>   hyperlink text

\useURL has four commands:

\useURL
  [ufdhc]
  [http://www.eiffel-forum.org/archive/dominicu/fdh.htm]
  []
  [Unix File/Directory Handling Cluster]


The 4th is the replacement text, so you get the text, and not the
URL. If the 4th is not provided, you just get the url.


-- 
Groetjes,

Berend. (-:

Reply via email to