[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Use of ampersands in name value pairs of a url

Subject: Re: Use of ampersands in name value pairs of a url
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 23 Apr 2004 11:05:20 +0100
url escaping
  The problem is with the query string of the url (the bit after the ?).
  Afaik, name-value pairs need to separated ampersands, such as:

  ?one=value1&two=value2&three=value3

That's what the URL has but like any string, to put that into an XML file
or HTMl file you have to quote the &.

Some legacy browsers try to be kind by not enforcing that you quote the
& but that's not kind, only confusing.

If you type the above into a location/address bar it has to be as above,
but if you type it into a src attribute it has to be 


?one=value1&amp;two=value2&amp;three=value3

Otherwise the document it in is not valid (or not well formed)

  I know that url escaping allows for %26 to be used instead of ampersands
 - but apparently not for the separator, this needs to be an actual
  ampersand.

Yes, you don't want url escaping here, that would be used to get a &
_into_ the value rather than be a separator.


  What is the usual technique to create the query string in xsl?

Just go with the flow and let XSLT force you into doing the right thing.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.