<!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.&nbsp; Is there a means of passing&nbsp;entity reference 
text (e.g. "&amp;beta;", "&amp;delta;")&nbsp;unresolved into non-unicode (e.g. 
ISO-8859-1, ASCII, or Cp1250) text output that will ultimately be incorporated 
into HTML?&nbsp; 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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001>The&nbsp;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.&nbsp; 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.&nbsp; </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=392215319-10102001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001>The problem appears 
to be that simply setting .setExpandEntities() to&nbsp;false&nbsp;results in 
the&nbsp;references being stripped from the output.&nbsp; Altering the 
replacement character reference(s) in the external entity reference files to 
reflect the entity name&nbsp;(replace "&amp;#916;" with 
"&amp;Delta;")&nbsp;results in the parser generating a "recursive reference" 
error.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=392215319-10102001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=392215319-10102001>Any and all 
suggestions are welcome.&nbsp; And thanks in advance for any&nbsp;assistance 
rendered.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; </SPAN>//Load XML into JDOM 
document<BR><SPAN class=392215319-10102001>&nbsp;&nbsp;&nbsp; </SPAN>SAXBuilder 
builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");<BR><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; 
</SPAN>builder.setValidation(true);<BR><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; 
</SPAN>builder.setExpandEntities(false);</FONT></FONT></DIV>
<DIV><FONT face="Courier New" size=1></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; </SPAN>Document doc = 
builder.build(new FileInputStream(parseFile), docType);</FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT size=1></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; </SPAN>&lt;!ENTITY % ISOlat1&nbsp; 
PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" "ISOlat1"&gt; 
%ISOlat1;<BR><SPAN class=392215319-10102001>&nbsp;&nbsp;&nbsp; 
</SPAN>&lt;!ENTITY % ISOlat2&nbsp; PUBLIC "ISO 8879-1986//ENTITIES Added Latin 
2//EN" "ISOlat2"&gt; 
%ISOlat2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; <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>&nbsp;&nbsp;&nbsp; </SPAN>&lt;!ENTITY 
Delta&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&amp;#916;"&nbsp;&nbsp; &gt;&lt;!--U0394 
=capital Delta, Greek --&gt;<BR><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; </SPAN>&lt;!ENTITY 
epsi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&amp;#949;"&nbsp;&nbsp; 
&gt;&lt;!--U03B5 =small epsilon, Greek --&gt;<BR><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; </SPAN>&lt;!ENTITY 
epsis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&amp;#949;"&nbsp;&nbsp; &gt;&lt;!--U03B5 
/straightepsilon --&gt;</FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT size=1><SPAN 
class=392215319-10102001>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>......</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</DIV></BODY></HTML>