[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] href with & ?


Subject: RE: [xsl] href with & ?
From: "Julian Reschke" <julian.reschke@xxxxxx>
Date: Wed, 18 Sep 2002 01:41:01 +0200

> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Peter Davis
> Sent: Tuesday, September 17, 2002 11:05 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] href with & ?
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday 17 September 2002 13:39, Holmberg Rick-ra0119 wrote:
> > I was thinking that somehow because it was a part of the href, that it
> > needed to be & instead of &amp; to show up correctly.
>
> You are right that it should be "&" in HTML, but the XSLT page is

No, he isn't. It's "&amp;" *both* in HTML and XML.

> in XML.  It
> is only translated to HTML by the XSLT engine's serializer, when
> you specify
> an <xsl:output method="html"/> tag.  The engine doesn't copy the text
> literally; it first parses the XSLT page using a normal XML
> parser, and then
> serializes the parsed text according to the output method and encoding.

Correct.

But note that it would be a *bug* if the XSLT engine serialized the
ampersand just as "&" in HTML attributes.

Julian

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


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



Current Thread
Keywords