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

Re: Entities in Attribute Values

  • From: Arjun Ray <aray@q...>
  • To: xml-dev@i...
  • Date: Fri, 13 Jun 1997 01:02:55 -0400 (EDT)

entities and an attribute


On Thu, 12 Jun 1997, David Schach wrote:

> Because entity references are allowed inside ot attribute values, it is
> not possible to store an unmodified URL with data in an attribute.  For
> example, the following XML is not valid because the '&''s are not
> escaped inside of SELF's HREF value.  

This is a problem only if '&' *must* be the field separator. Why not
something else,, like ';' ?

> 	<SELF
> HREF="http://someserver/scripts/oleisapi2.dll/comics.custom.cdf?comics=o
> n&dilbert=on&calvin=on&peanuts=on" />
> 
> This makes it inconvenient to store URL's in XML files.  Would it anyone
> be interested in changing entity processing to fix this?

IMHO, there's no need for that. Or, at any rate, there shouldn't be. Using
'&' as a field separator in "query URLs" is a historical artefact of lack
of RTFM. The problem was recognized reasonably early too, and a fix was
proposed, but no HTML browser implementor of, ah, consequence ever got a
Round Tuit. 

>From RFC 1866, Section 8.2.1 "The form-urlencoded Media Type":

           NOTE - The URI from a query form submission can be
            used in a normal anchor style hyperlink.
            Unfortunately, the use of the `&' character to
            separate form fields interacts with its use in SGML
            attribute values as an entity reference delimiter.
            For example, the URI `http://host/?x=1&y=2' must be
            written `<a href="http://host/?x=1&#38;y=2"' or `<a
            href="http://host/?x=1&amp;y=2">'.

            HTTP server implementors, and in particular, CGI
            implementors are encouraged to support the use of
            `;' in place of `&' to save users the trouble of
            escaping `&' characters this way.
 
We're not committed to perpetauting mistakes, are we?


Arjun



xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.