At 11:26 AM 3/17/2002 +0100, Giuseppe Bilotta wrote:

>Sunday, March 17, 2002 Michael Wiedmann wrote:
>
>
>MW> - given an XML file with a line like
>MW>   <ulink url="http://some.net";>...</ulink>
>MW>   applying the follwoing:
>MW>   \splitstring\XMLpar{ulink}{url}{}\at://\to\protocol\and\tail
>MW>   does not work like expected. Instead I get the whole URL in \protocol
>MW>   and \tail is mpty
>
>Catcode problem, probably. What about the following:
>
>\splitstring{\scantokens{\XMLpar{ulink}{url}{}}}\at://\to\protocol\and\tail
>
>or
>
>\expandafter\splitstring\expandafter{\scantokens{\XMLpar{ulink}{url}{}}}\at://\to\protocol\and\tail

beware, scantokens adapts to the current catcode regime; when a macro is 
loaded it's kind of frozen, so then a \ is still a \, while in xml mode, 
the \ is something different, so here scantokens would read the data as 
being xml (unless xml mode is temporary disables).

I guess that this fuzzy explanation will make you go into the tex source 
code -)

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
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-ade.nl
-------------------------------------------------------------------------

Reply via email to