Nick Vincent writes:
 > <?xml version="1.0" standalone="no"?>
 > <!DOCTYPE moreovernews SYSTEM
 > "http://p.moreover.com/xml_dtds/moreovernews.dtd">
 > 
 > <allproducts>
 >      <quid>&pound;</quid>
 >      <amp>&amp;</amp>
 >      <acute>&acute;</acute>
 > </allproducts>

If the entities are defined in your DTD, the Expat parser does NOT
read them. It only reads the DTD subset in the document itself. It is
maddening, but such is life. Many other parsers *do* read the DTD, so
you can get caught out like this

 > Is this by design,
yes

 >  and if so is there any way round it?  

define the entities in the DTD subset in each document

 > I've tried using the &#163; syntax to specify a pound sign, but a '£'
 > (Ascii 194, Ascii 163) appears in the document when I parse it, and is
 > subsequently displayed in the browser.  This also looks a bit silly.

thats because the default output encoding is UTF8, which any decent
browser should understand. Does Sabltoron support other output
encodings? I cannot remember.

you are in a Unicode world now. probably best to bite the bullet and
get software which understands Unicode/UTF8. or run post-processing
converters (like iconv)

Sebastian

Reply via email to