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]
Other format: [Raw text]

RE: Best practice question, regarding escaped entitiy declarations


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@ddpwa.com]
> Sent: Tuesday, March 26, 2002 10:48 AM
> To: 'xsl-list@lists.mulberrytech.com'
> Subject: [xsl] 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 £. However, in order to make the XSL parser play nice with
it, I
> am
> forced to use something like this:
> 
> £
> 
> 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
> £ (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


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