This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Entities
- To: xsl-list at mulberrytech dot com
- Subject: Re: Entities
- From: Jonathan Irving <jonathan dot irving at sun dot com>
- Date: Tue, 22 Feb 2000 18:55:46 +0000
- Cc: EWolfe at medcm dot com
- References: <C0EC84AC9CD2D311A08400805F85036705FA5E@mail.medcm.com>
- Reply-To: xsl-list at mulberrytech dot com
On Tue, Feb 22, 2000 at 01:10:17PM -0500, Ezra Wolfe wrote:
> Does anyone know how to use HTML entities in an XSL document? Is there an
> escape command?
>
> For example:
>
> & is an ampersand (&)
> is a non-breaking space.
XSLT is XML, so you get the XML entities for free. to
generate an entity reference in yr output doc, do
&amp;
&nbsp;
or:
> How can I put white space directly in the XSL, not the XML?
i believe:
<xsl:text> </xsl:text>
will (for example) insert a single space into the output.
i have a related question. i wish to do an identity
transformation on some XML (which is HTML-ish). i need to
pass through (and other entity references)
unmodified, but i'm having problems.
first off, i encountered the UTF-8 encoding with XT issue,
which i can work around, but i'm more concerned that i
can't seem to reproduce the reference -- for example,
becomes a space character.
how can i preserve these, that is, emit a &entity; for
every instance of &entity; encountered?
cheers
jonathan
--
.sigbot at <contact-j@bast.uk.sun.com> for phone/address etc
+----------------+-------------------------------------------+
| ECHELON Fodder | T2S2 TSCM ASVC Unit 669 PA598D28 |
| | Offensive Information Warfare |
+----------------+-------------------------------------------+
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list