This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Generating CGI querystrings: How to write a literal ampersand?
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¶m2=value2¶m3=value3
> >
> > I have not succeeded in writing out the literal ampersand.
>
> No you don't want an & you want & If that URI is appearinng in XHTML
> you _have_ to have & If it is in HTML then it's best to have &
> 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&y=2"> or <A
href="http://host/?x=1&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@redhat.com | 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