xsl-list
[Top] [All Lists]

Re: Yet Another Entity Ref question!

2002-12-19 13:00:05
Marco Guazzone wrote:
I'd like to produce an entity reference, say "©", from XML to HTML
through XSLT;

Put Unicode character #169 (the copyright symbol) in your stylesheet
with © or ©

Change your output encoding to us-ascii to ensure that the XSLT processor
won't emit that character directly encoded. ASCII does not have a copyright 
symbol, so the processor will emit a numeric character reference like © 
or an entity reference like &copy.

You won't be able to control whether the processor emits © or
©, but I believe most XSLT processors try to emit entity refs when
the character falls in the latin-1 range and isn't able to be expressed
directly in the given encoding.

Mike

-- 
  Mike J. Brown   |  http://skew.org/~mike/resume/
  Denver, CO, USA |  http://skew.org/xml/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>