This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: ampersand character in xsl attribute?
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 18 Dec 2001 09:43:20 -0000
- Subject: RE: [xsl] ampersand character in xsl attribute?
- Reply-to: xsl-list at lists dot mulberrytech dot com
> Is it true that it's impossible to have a stylesheet ouptut an "&"
> character when inside an attribute?
In general, the only way you can output ill-formed XML or HTML using the
XML/HTML output methods is by using disable-output-escaping; and d-o-e is
specifically not allowed for attribute nodes. So the answer is that it's
almost impossible: the only way to achieve it is to output the entire
start/end tag of the element using d-o-e.
Fortunately, as the many previous instances of this thread have proved,
that's not needed. Many previous askers of this question have been
challenged to identify specific HTML clients that don't accept the correct
escaped & form of a URL, and as far as I recall they have never come up
with a credible example of such a product. It's an urban myth.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list