- if (output_preamble) {
- if (runparams.flavor == OutputParams::XML)
- os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
-
- // FIXME UNICODE
- os << "<!DOCTYPE " << from_ascii(top_element) << ' ';
-
- // FIXME UNICODE
- if (! tclass.class_header().empty())
- os << from_ascii(tclass.class_header());
- else if (runparams.flavor == OutputParams::XML)
- os << "PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" "
- << "\"https://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\"";
- else
- os << " PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\"";
-
- docstring preamble = params().preamble;
- if (runparams.flavor != OutputParams::XML ) {
- preamble += "<!ENTITY % output.print.png \"IGNORE\">\n";
- preamble += "<!ENTITY % output.print.pdf \"IGNORE\">\n";
- preamble += "<!ENTITY % output.print.eps \"IGNORE\">\n";
- preamble += "<!ENTITY % output.print.bmp \"IGNORE\">\n";
- }
-
- string const name = runparams.nice
- ? changeExtension(absFileName(), ".sgml") : fname;
- preamble += features.getIncludedFiles(name);
- preamble += features.getLyXSGMLEntities();