if (isCreateBodyFragment() == false)
{
if (isInlineStylesRequested())
{
this.styleManager = new InlineStyleManager();
this.xmlWriter = new XmlWriter(writer, td);
this.xmlWriter.addImpliedNamespace(HtmlPrinter.XHTML_NAMESPACE, "");
this.xmlWriter.setHtmlCompatiblityMode(true);
writeCompleteHeader(xmlWriter, writer, contentProducer, logicalPage, null, null);
}
else
{
if (isExternalStyleSheetRequested())
{
this.styleFile = dataLocation.createItem(dataNameGenerator.generateName("style", "text/css"));
this.styleFileUrl = urlRewriter.rewrite(documentContentItem, styleFile);
}
this.styleManager = new GlobalStyleManager();
if (isForceBufferedWriting() == false && styleFile != null)
{
this.xmlWriter = new XmlWriter(writer, td);
this.xmlWriter.addImpliedNamespace(HtmlPrinter.XHTML_NAMESPACE, "");
this.xmlWriter.setHtmlCompatiblityMode(true);
writeCompleteHeader(xmlWriter, writer, contentProducer, logicalPage, styleFileUrl, null);
}
else
{
this.bufferWriter = new MemoryStringWriter(1024 * 512);
this.xmlWriter = new XmlWriter(bufferWriter, td);
this.xmlWriter.setAdditionalIndent(1);
this.xmlWriter.addImpliedNamespace(HtmlPrinter.XHTML_NAMESPACE, "");
this.xmlWriter.setHtmlCompatiblityMode(true);
}
}
this.xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, "body", XmlWriterSupport.OPEN);
}
else
{
this.styleManager = new InlineStyleManager();
this.xmlWriter = new XmlWriter(writer, td);
this.xmlWriter.addImpliedNamespace(HtmlPrinter.XHTML_NAMESPACE, "");
this.xmlWriter.setHtmlCompatiblityMode(true);
}
final ReportAttributeMap map = logicalPage.getAttributes();