Having problems with the following code:

Table t = new Table();
t.addElement(new TR(true).setBgColor(HtmlColor.BLUE)
        .addElement(new TD(true).addElement(new Font()
                .setColor(HtmlColor.WHITE).addElement("r2c1")))
        .addElement(new TD(true).addElement("r2c2"))
        .addElement(new TD(true).addElement("r2c3")))
.addElement(new TR(true)
        .setBgColor(HtmlColor.WHITE)
        .addElement(new TD(true).addElement("r3c1"))
  .addElement(new TD(true).addElement("r3c2"))
  .addElement(new TD(true).addElement("r3c3")));
                        
                        
Document doc = (Document) new Document();
        doc.appendTitle("SQLHTML Output");
        doc.appendBody(new H1("Select Statement:"));
        doc.appendBody(new Font().setSize("+1").setColor(HtmlColor.WHITE));
        doc.appendBody(t.toString());

System.out.println(doc.toString());

Generates:
<html><head><title>SQLHTML Output</title></head>
<body>
<h1>Select Statement:</h1><font color="#FFFFFF" size="+1"></font>
<table>
  <tr bgcolor=&#34;#0000FF&#34;>
    <td><font color=&#34;#FFFFFF&#34;>r2c1</font></td>\
    <td>r2c2</td>
    <td>r2c3</td>
  </tr>
  <tr bgcolor=&#34;#FFFFFF&#34;>
    <td>r3c1</td>
    <td>r3c2</td>
    <td>r3c3</td>
  </tr>
</table>
</body></html>


It seems that the first call to Font.setColor() produces <font 
color="#FFFFFF"> but my calls to setBGColor and subsequent Font.setColor 
calls produce &#34;#FFFFFF&#34; not "#FFFFFF".  I have examined the source 
for ECS 1.1 and both make a call to the same function: 
addAttribute("color",HtmlColor.convertColor(color)) but something seems to 
be replacing the quotes with the escape sequences.  This causes IE 5 and 
Nav 4 to evaluate &#34;#FFFFFF&#34; (white) to #00FFFF (Aqua?).  Any help 
as to what I'm doing wrong?

I'm using ecs1.1 and have tested this against ecs1.0.x and both have this 
problem.  I am running IE5 on my NT box and Nav 4 on my sgi and both behave 
similarly.  This chunk of code is running on an Apache server on my NT box 
using Apache 1.3.9 and jserv 1.1b3.

My best guess is that something is filtering the quote character and 
translating it to the escape sequence.  Any help would be appreciated.

Michael Wilson
Software Engineer
SONY PICTURES IMAGEWORKS
9050 W. Washington Blvd. Culver City, CA  90232
phone:  (310) 840-8469
cell: (310) 463-1514
pager:  (310) 298-6316
email:  [EMAIL PROTECTED]




--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to