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

Re: 𡁀 coming out as ?

Subject: Re: 𡁀 coming out as ?
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 8 Mar 2002 16:17:36 -0700 (MST)
Re:  &#x21040; coming out as ?
Randy Belknap wrote:
> I've got a .xsl file with the following html markup in it:
> 
> <td>&#21040;</td><td>5/1/02</td>
> 
> where &#21040; is the decimal value of a chinese character.  The problem is
> that when I run the xsl through the transformer (MICROSOFT.XMLDOM), it
> outputs <td>?</td><td>5/1/02</td>.  Is this enough information to know what
> I am doing wrong?

Post a code sample of how you are creating the document and invoking the 
transformer, and where your result is going. I'm sure someone can point
out what you're doing wrong.

> I tried to get around the problem by used CDATA as follows:
> 
> <td><![CDATA[&#21040;]]></td><td>5/1/02</td>
> 
> but that produces <td>&amp;#21040;</td><td>5/1/02</td>, so the browser
> displays &21040; instead of the chinese character.  

As it should.

> (BTW, I thought CDATA
> was supposed to be not parsed at all.)

It is not parsed in the sense that it is not scanned for "&" and "<"  
characters indicating the start of more markup, but it is parsed in the sense
that it is read by an XML parser and reported to the application as a block of
character data just like any other character data; it is not flagged as being 
special in any way. It's just a convenience for the document author so you
don't have to escape "&" and "<". Most of the time you should just pretend 
CDATA sections don't exist, because they won't help you in the way that you 
want them to.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 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.