Re: [NTG-context] xml and catcode switching

2010-03-24 Thread Philipp Gesang
Good morning!


On 2010-03-23 <18:48:15>, Hans Hagen wrote:
> On 22-3-2010 10:53, Philipp Gesang wrote:
> >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?
> 
> \goto{\hyphenatedurl{...}}[url(...)]

 I somehow entirely missed the trivial solution: not
specifying an alternate description.   

Thanks for the hint with \goto, I didn't know that before.  As there was
no hit on the wiki search when asking it for “url” I created an article for
this lemma; please add the stuff I missed.


Philipp



> 
> or something like that
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>  | www.pragma-pod.nl
> -
> ___
> 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
> ___

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


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
___


Re: [NTG-context] xml and catcode switching

2010-03-23 Thread Hans Hagen

On 22-3-2010 10:53, Philipp Gesang wrote:

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?


\goto{\hyphenatedurl{...}}[url(...)]

or something like that

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


[NTG-context] xml and catcode switching

2010-03-22 Thread Philipp Gesang
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]

  

\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


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
___