XMLOutputFactory factory = XMLOutputFactory.newInstance();
factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
XMLStreamWriter xsw = factory.createXMLStreamWriter(po, Constants.DEFAULT_ENCODING);
xsw.writeStartDocument(Constants.DEFAULT_ENCODING, "1.0");
xsw.writeDTD("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" "
+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
xsw.writeCharacters("\n");
xsw.writeStartElement("html");
xsw.writeDefaultNamespace(XHTML_NS);
xsw.writeStartElement("head");