final Writer writer = new OutputStreamWriter(outputStream, "UTF-8");
this.rootXmlWriter = new XmlWriter(writer, tagDescription);
this.rootXmlWriter.setAlwaysAddNamespace(true);
final AttributeList rootAttributes = new AttributeList();
rootAttributes.addNamespaceDeclaration("office", OfficeNamespaces.OFFICE_NS);
rootAttributes.addNamespaceDeclaration("style", OfficeNamespaces.STYLE_NS);
rootAttributes.addNamespaceDeclaration("text", OfficeNamespaces.TEXT_NS);
rootAttributes.addNamespaceDeclaration("table", OfficeNamespaces.TABLE_NS);
rootAttributes.addNamespaceDeclaration("draw", OfficeNamespaces.DRAWING_NS);
rootAttributes.addNamespaceDeclaration("fo", OfficeNamespaces.FO_NS);
rootAttributes.addNamespaceDeclaration("xlink", OfficeNamespaces.XLINK_NS);
rootAttributes.addNamespaceDeclaration("dc", OfficeNamespaces.PURL_NS);
rootAttributes.addNamespaceDeclaration("meta", OfficeNamespaces.META_NS);
rootAttributes.addNamespaceDeclaration("number", OfficeNamespaces.DATASTYLE_NS);
rootAttributes.addNamespaceDeclaration("svg", OfficeNamespaces.SVG_NS);
rootAttributes.addNamespaceDeclaration("chart", OfficeNamespaces.CHART_NS);
rootAttributes.addNamespaceDeclaration("dr3d", OfficeNamespaces.DR3D_NS);
rootAttributes.addNamespaceDeclaration("math", OfficeNamespaces.MATHML_NS);
rootAttributes.addNamespaceDeclaration("form", OfficeNamespaces.FORM_NS);
rootAttributes.addNamespaceDeclaration("script", OfficeNamespaces.SCRIPT_NS);
rootAttributes.addNamespaceDeclaration("ooo", OfficeNamespaces.OO2004_NS);
rootAttributes.addNamespaceDeclaration("ooow", OfficeNamespaces.OOW2004_NS);
rootAttributes.addNamespaceDeclaration("oooc", OfficeNamespaces.OOC2004_NS);
rootAttributes.addNamespaceDeclaration("dom", OfficeNamespaces.XML_EVENT_NS);
rootAttributes.addNamespaceDeclaration("xforms", OfficeNamespaces.XFORMS_NS);
rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS);
rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS);
rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0");
this.rootXmlWriter.writeXmlDeclaration("UTF-8");
this.rootXmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-content", rootAttributes, XmlWriterSupport.OPEN);
states.push(IntegerCache.getInteger(OfficeDocumentReportTarget.STATE_IN_DOCUMENT));