d.print("<!DOCTYPE html\n"); d.print("   PUBLIC \"- d.print("   \"DTD/xhtml1-transitional.dtd\">\n");
    protected void writeHeader(Device d, SFrame frame)        throws IOException    {        String language = "en"; // TODO: ???        String title = frame.getTitle();        List metas = frame.metas();        List headers = frame.headers();        d.print("<?xml version=\"1.0\" encoding=\"");        d.print(charSetFor(frame.getSession().getLocale()));        d.print("\"?>\n");        d.print("<!DOCTYPE html\n");        d.print("   PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n");        d.print("   \"DTD/xhtml1-transitional.dtd\">\n");        d.print("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"");        d.print(language);        d.print("\" lang=\"");        d.print(language);        d.print("\">\n");        d.print("<head>\n");        if (title != null) {            d.print("<title>").print(title).print("</title>\n");        }        if (frame.getBaseTarget() != null)            d.print("<base target=\"")                .print(frame.getBaseTarget())                .print("\" />");        d.print("<meta http-equiv=\"Content-type\" content='text/html; charset=\"");        d.print(charSetFor(frame.getSession().getLocale()));        d.print("\"' />\n");        d.print("<meta http-equiv=\"expires\" content=\"1000\" />\n");        d.print("<meta http-equiv=\"pragma\" content=\"no-cache\" />\n");        Iterator it = metas.iterator();        while (it.hasNext()) {            d.print("<meta ");            d.print(it.next());            d.print(" />\n");        }        it = headers.iterator();        while (it.hasNext()) {            d.print(it.next());            d.print("\n");        }        writeAdditionalHeaders(d, frame);        d.print("</head>\n");    }