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

Re: Entities

Subject: Re: Entities
From: Jonathan Irving <jonathan.irving@xxxxxxx>
Date: Tue, 22 Feb 2000 18:55:46 +0000
jonathan irving
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: 
> 
> &amp; is an ampersand (&)
> &nbsp; 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;amp;
  &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 &nbsp; (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,
&nbsp; becomes a space character.

how can i preserve these, that is, emit a &amp;entity; for
every instance of &entity; encountered?

cheers
jonathan

-- 
 .sigbot at <contact-j@xxxxxxxxxxxxxxx> 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


Current Thread

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
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.