Hi,

I'm formatting lots of urls and as some of them have ampersands in them
I switch & to letter wherever they are placed.  This works fine unless
combined with XML which seems to impose its own catcodes on things.  How
could I fix things in the following example?

Thanks for any suggestions,


Philipp

···8<··········································································
\useURL
  [testurl]
  [http://elibrary.karelia.ru/book.shtml?levelID=004002&id=2570&cType=2]
  []
  [http://elibrary.karelia.ru/book.shtml?levelID=004002&id=2570&cType=2]  % 
these ampersands cause it

\startxmlsetups urltest
\xmlsetsetup{urltest}{main|url}{xml:*}
\stopxmlsetups

\xmlregistersetup{urltest}

\startxmlsetups xml:main
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:url
\begingroup
  \catcode`\&=11
  \from[testurl]
\endgroup
\stopxmlsetups

\startbuffer[urltestbuf]
<main>
  <url/>
</main>
\stopbuffer

\starttext
Test
{\catcode`\&=11 \from[testurl]}           % this one works: no xml
\xmlprocessbuffer{urltest}{urltestbuf}{}
Test
\stoptext
···8<··········································································



-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to