string top_element = textclasslist.LatexnameOfClass(params.textclass);
if (!body_only) {
- string sgml_includedfiles=features.getIncludedFiles(fname);
+ ofs << "<!doctype linuxdoc system";
- if (params.preamble.empty() && sgml_includedfiles.empty()) {
- ofs << "<!doctype linuxdoc system>\n\n";
- } else {
- ofs << "<!doctype linuxdoc system [ "
- << params.preamble << sgml_includedfiles << " \n]>\n\n";
+ string preamble = params.preamble;
+ preamble += features.getIncludedFiles(fname);
+ preamble += features.getLyXSGMLEntities();
+
+ if (!preamble.empty()) {
+ ofs << " [ " << preamble << " ]";
}
+ ofs << ">\n\n";
if (params.options.empty())
sgmlOpenTag(ofs, 0, top_element);
}
-void Buffer::docbookHandleCaption(ostream & os, string & inner_tag,
- Paragraph::depth_type depth, int desc_on,
- Paragraph * & par)
-{
- Paragraph * tpar = par;
- while (tpar
- && (tpar->layout != textclasslist.NumberOfLayout(params.textclass,
- "Caption").second))
- tpar = tpar->next();
-
- if (tpar &&
- tpar->layout == textclasslist.NumberOfLayout(params.textclass,
- "Caption").second) {
- sgmlOpenTag(os, depth + 1, inner_tag);
- string extra_par;
- simpleDocBookOnePar(os, extra_par, tpar,
- desc_on, depth + 2);
- sgmlCloseTag(os, depth+1, inner_tag);
- if (!extra_par.empty())
- os << extra_par;
- }
-}
-
-
// checks, if newcol chars should be put into this line
// writes newline, if necessary.
namespace {
} // namespace anon
-
-
// Handle internal paragraph parsing -- layout already processed.
void Buffer::simpleLinuxDocOnePar(ostream & os,
Paragraph * par,
string top_element = textclasslist.LatexnameOfClass(params.textclass);
if (!only_body) {
- string sgml_includedfiles = features.getIncludedFiles(fname);
+ ofs << "<!DOCTYPE " << top_element
+ << " PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\"";
- ofs << "<!doctype " << top_element
- << " public \"-//OASIS//DTD DocBook V3.1//EN\"";
+ string preamble = params.preamble;
+ preamble += features.getIncludedFiles(fname);
+ preamble += features.getLyXSGMLEntities();
- if (params.preamble.empty() && sgml_includedfiles.empty())
- ofs << ">\n\n";
- else
- ofs << "\n [ " << params.preamble
- << sgml_includedfiles << " \n]>\n\n";
+ if (!preamble.empty()) {
+ ofs << "\n [ " << preamble << " ]";
+ }
+ ofs << ">\n\n";
}
string top = top_element;