Re: me escape logic escapes me

Subject: Re: me escape logic escapes me
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 22 Aug 2000 16:57:14 -0600 (MDT)
Aaron Miller wrote:
> I've noticed that when I use &amp; entity as part of a value in a
> <xsl:attribute name="src"> node, nameley for a dynamic URL with encoded
> parameters, the parser 

By parser I assume you mean an XSLT processor.

> refuses to change it to a "&" character.

As well it shouldn't, when emitting HTML or XML, since an HTML user agent
reading such a document is required to treat &amp; in attribute values and
character data as '&', just as an XML parser must also do.

Someone pointed to an example of one WML minibrowser that didn't handle
this properly, but so far that's the only example I've heard of where you
ever really needed to write '&' instead of '&amp;' in an attribute value,
even for a URI.

HTML was wrong to allow people to ever use '&' for anything other than the
beginning of an entity reference. XML fixes that.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


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


Current Thread