This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Entities


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

  &
   
  
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@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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]