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

RE: Best practice question, regarding escaped entitiy

Subject: RE: Best practice question, regarding escaped entitiy declarations
From: "Joshua Allen" <joshuaa@xxxxxxxxxxxxx>
Date: Tue, 26 Mar 2002 11:15:32 -0800
escaping pound symbol in xml
You can define a variable in your stylesheet, like $pound, and set it
equal to the Unicode character, then use $pound throughout the code.  It
is possible to also load a DTD that has this entity defined, but I
really do not like that option.  I would stick with Unicode, and
optionally use a variable.  Also note that you can use the straight
pound character with no escaping, so long as your stylesheet is written
in utf-8 or utf-16 and outputs into one of these encodings (and you edit
with an editor that supports Unicode).  In other words, there is no
requirement to escape Unicode characters -- it is more a convenience for
text editors that only support ANSI.


> -----Original Message-----
> From: Snow, Corey [mailto:CSNOW@xxxxxxxxx]
> Sent: Tuesday, March 26, 2002 10:48 AM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  Best practice question, regarding escaped entitiy
> declarations
> 
> Let's say I have an XSLT stylesheet which needs, under certain
> circumstances, to output the British Pound symbol. It is represented
in
> HTML
> as &pound;. However, in order to make the XSL parser play nice with
it, I
> am
> forced to use something like this:
> 
> &amp;pound;
> 
> Which seems a bit kludgy. If this is the acceptable method, it's fine-
but
> I
> wondered if it's considered a better way to go than outputting the
Unicode
> &#xA3; (had to go and dig up this one at the unicode web site). My
> preference is to use the Unicode character directly, but I'm wondering
if
> that leads to its own problems.
> 
> Comments? Thanks,
> 
> Corey Snow
> 
> #########################################################
> The information contained in this e-mail and subsequent attachments
may be
> privileged,
> confidential and protected from disclosure.  This transmission is
intended
> for the sole
> use of the individual and entity to whom it is addressed.  If you are
not
> the intended
> recipient, any dissemination, distribution or copying is strictly
> prohibited.  If you
> think that you have received this message in error, please e-mail the
> sender at the above
> e-mail address.
> #########################################################
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.