[NTG-context] URLs in XML, escaping special characters

Denis Maier denismaier at mailbox.org
Wed Oct 7 17:16:26 CEST 2020


Am 07.10.2020 um 16:47 schrieb Wolfgang Schuster:
> Denis Maier schrieb am 07.10.2020 um 15:42:
>> Hi,
>>
>> I'm struggling with getting hyphenated URLs to work from XML input.
>> How do you enter ampersands and percent signs correctly so that they 
>> can be used in links?
>>
>> This here doesn't really works:
>>
>> ================
>> \startxmlsetups xml:test
>>     \xmlsetsetup{#1}{*}{-}
>>     % Hauptgruppen
>>     \xmlsetsetup{#1}{article|ext-link}{xml:*}
>> \stopxmlsetups
>>
>> \xmlregistersetup{xml:test}
>>
>> \startxmlsetups xml:article
>> \starttext
>>     \xmlflush{#1}
>> \stoptext
>> \stopxmlsetups
>>
>> \startxmlsetups xml:ext-link
>>     \goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})]
>> \stopxmlsetups
>
> \startxmlsetups xml:ext-link
>     \begingroup
>         \expandUx
> \expanded{\goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})]}
>     \endgroup
> \stopxmlsetups
>
> Wolfgang

Thanks, Wolfgang.

Unfortunately, the clickable link is still not correct. What am I doing 
wrong?

Best,
Denis



More information about the ntg-context mailing list