*/
#include <config.h>
+#include <output_docbook.h>
#include "InsetMarginal.h"
}
-int InsetMarginal::docbook(odocstream & os,
- OutputParams const & runparams) const
+void InsetMarginal::docbook(XMLStream & xs, OutputParams const & runparams) const
{
- os << "<note role=\"margin\">";
- int const i = InsetText::docbook(os, runparams);
- os << "</note>";
-
- return i;
+ // Implementation as per http://www.sagehill.net/docbookxsl/SideFloats.html
+ // Unfortunately, only for XSL-FO output with the default style sheets, hence the role.
+ xs << xml::StartTag("sidebar", "role=\"margin\"");
+ xs << xml::CR();
+ xs << "<?dbfo float-type=\"margin.note\"?>";
+ InsetText::docbook(xs, runparams);
+ xs << xml::EndTag("sidebar");
}