]> git.lyx.org Git - features.git/commitdiff
patch from Andreas Vox to fix unclosed tag in docbook-xml.
authorJosé Matox <jamatos@lyx.org>
Sat, 25 Sep 2004 12:26:07 +0000 (12:26 +0000)
committerJosé Matox <jamatos@lyx.org>
Sat, 25 Sep 2004 12:26:07 +0000 (12:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9005 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetref.C

index 5487284c365f7e9656d5fa19ba7b0d868d9f2a26..95dbd12efa5459b2063fd9875667651fb834b154 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-24  Andreas Vox  <vox@isp.uni-luebeck.de>
+
+       * insetref.C (docbook): fixing problem where Docbook XML output
+        had unclosed <xref ... >
+
 2004-08-16  José Matos  <jamatos@lyx.org>
 
        * insethfill.C (write):
index c5394d499d141244cf33f503305379cdde12e5f9..f30f0710229166f024ca9323c9d89f235612dad5 100644 (file)
@@ -18,6 +18,7 @@
 #include "funcrequest.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
+#include "outputparams.h"
 
 #include "frontends/LyXView.h"
 
@@ -110,9 +111,11 @@ int InsetRef::linuxdoc(Buffer const &, ostream & os,
 
 
 int InsetRef::docbook(Buffer const &, ostream & os,
-                     OutputParams const &) const
+                     OutputParams const & runparams) const
 {
-       if (getOptions().empty()) {
+       if (getOptions().empty() && runparams.flavor == OutputParams::XML) {
+               os << "<xref linkend=\"" << getContents() << "\" />";
+       } else if (getOptions().empty()) {
                os << "<xref linkend=\"" << getContents() << "\">";
        } else {
                os << "<link linkend=\"" << getContents()