Re: [xsl] Generating CGI querystrings: How to write a literal ampersand?

Subject: Re: [xsl] Generating CGI querystrings: How to write a literal ampersand?
From: Daniel Veillard <Daniel.Veillard@xxxxxxx>
Date: Fri, 30 Mar 2001 13:35:56 +0200
On Fri, Mar 30, 2001 at 12:03:25PM +0100, David Carlisle wrote:
> 
> > I need to generate CGI querystrings from an XML data file(s), thus need
> > to produce a string such as:
> > 
> > url?param1=value1&param2=value2&param3=value3 
> > 
> > I have not succeeded in writing out the literal ampersand.
> 
> No you don't want an & you want &amp; If that URI is appearinng in XHTML
> you _have_ to have &amp; If it is in HTML then it's best to have &amp;
> although &  on its own is legal so long as the "param2" in your example

  Nahh, it's not legal. It's a common abuse but it is not legal !

  http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2

--------------
For example, to use the URI "http://host/?x=1&y=2"; as a linking
URI, it must be written <A href="http://host/?x=1&#38;y=2";> or <A
href="http://host/?x=1&amp;y=2";>.
--------------

  I read a must there, not a should ...
If only HTML processing/authoring toolkits were reporting this error,
sigh ...

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@xxxxxxxxxx  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread