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

Using HTML entity codes within XSL?

Subject: Using HTML entity codes within XSL?
From: "Richie B" <richie@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Dec 2002 17:52:21 -0000
pound html entity
Hi,
	I'm trying to do something like the following in XSL:

<xsl:template match="/">
  <html>
  <body>
	&pound;<xsl:value-of select="data/premiumAmount" />
  </body>
  </html>
</xsl:template>

I'd like to output HTML character entities to a browser, so that the browser
will render the correct character internally, independent of the user's
set-up, rather than having to use something like a pound symbol "£"
for the Latin-1 character set - but I obviously get an error if I try to
use "&pound;" within the XSL ("Reference
to undefined entity 'pound'.").  The solution at
http://www.dpawson.co.uk/xsl/characters.html
says to specify the character set, but this would defeat the purpose, and
also systems aren't required to understand any encodings other than UTF-8
and UTF-16.  Is
there a way I can, in some form, use something like "&pound;" or another
character reference (such as "&eacute;") in my XSL
without specifying a specific character set/number to use?  Also, I've
noticed I can already use certain codes such as "&amp;" and "&gt;" - is
there a list of defined codes which can be used in XSL?

Thanks,
Rich





 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.