<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001>Perhaps a newbie
question, but here goes. Is there a means of passing entity reference
text (e.g. "&beta;", "&delta;") unresolved into non-unicode (e.g.
ISO-8859-1, ASCII, or Cp1250) text output that will ultimately be incorporated
into HTML? The intent on the output side is to give the browser a chance
on it's own to render the corresponding character.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=392215319-10102001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001>The application
involved currently handles parsing of UTF-8 encoded xml files using a PubMed.dtd
for validation and utilizes or variously references 19 external ISO... character
entity files in the process. It has no problem writing out
browser-renderable UTF-8 files or text, but because we're not able to specify
the encoding in the HTTP header or in HTML META tags in the destination
application, passing the entity references though unaltered seems the best
option. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=392215319-10102001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001>The problem appears
to be that simply setting .setExpandEntities() to false results in
the references being stripped from the output. Altering the
replacement character reference(s) in the external entity reference files to
reflect the entity name (replace "&#916;" with
"&Delta;") results in the parser generating a "recursive reference"
error.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=392215319-10102001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001>Any and all
suggestions are welcome. And thanks in advance for any assistance
rendered.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN
class=392215319-10102001> </SPAN>//Load XML into JDOM
document<BR><SPAN class=392215319-10102001> </SPAN>SAXBuilder
builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");<BR><SPAN
class=392215319-10102001>
</SPAN>builder.setValidation(true);<BR><SPAN
class=392215319-10102001>
</SPAN>builder.setExpandEntities(false);</FONT></FONT></DIV>
<DIV><FONT face="Courier New" size=1></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN
class=392215319-10102001> </SPAN>Document doc =
builder.build(new FileInputStream(parseFile), docType);</FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT size=1></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN
class=392215319-10102001> </SPAN><!ENTITY % ISOlat1
PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" "ISOlat1">
%ISOlat1;<BR><SPAN class=392215319-10102001>
</SPAN><!ENTITY % ISOlat2 PUBLIC "ISO 8879-1986//ENTITIES Added Latin
2//EN" "ISOlat2">
%ISOlat2; <BR><SPAN
class=392215319-10102001> <FONT face=Arial
size=2>......</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001></SPAN></FONT><FONT
face="Courier New"><FONT size=1><SPAN
class=392215319-10102001> </SPAN><!ENTITY
Delta "&#916;" ><!--U0394
=capital Delta, Greek --><BR><SPAN
class=392215319-10102001> </SPAN><!ENTITY
epsi "&#949;"
><!--U03B5 =small epsilon, Greek --><BR><SPAN
class=392215319-10102001> </SPAN><!ENTITY
epsis "&#949;" ><!--U03B5
/straightepsilon --></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN
class=392215319-10102001> <FONT face=Arial
size=2>......</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2><SPAN class=060373013-20062001>Steven
Sodt</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=060373013-20062001>RoweCom, Inc. /
Information Quest</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=060373013-20062001><A
href="mailto:steve.sodt@rowe.com">steve.sodt@rowe.com</A></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=060373013-20062001>781-329-3350 x
3503</SPAN></FONT></DIV></DIV>
<DIV> </DIV></BODY></HTML>