RE: [xsl] Ampersand in attributes

Subject: RE: [xsl] Ampersand in attributes
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 7 Oct 2004 08:50:12 +0100
> I'm using saxon and I'm having problems generating anchor 
> links. Because the
> source has to be XML I'm changing ampersands to &amp;. For example:
>  
> link.jsp?p1=1&amp;p2=2&amp;p3=3
>  
> My output method is HTML but the result generated mantains the &amp;.
> 

The HTML spec requires that ampersands in URLs should be written as &amp;

Of course many HTML authors ignore that rule, and browsers let them get away
with it. But &amp; is correct.

Michael Kay
http://www.saxonica.com/

Current Thread