From d3365ebbe748a5500186729add2969c7dc34b812 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 30 Nov 2009 22:28:54 +0000 Subject: [PATCH] Restore XHTML output for InsetBibitem. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32257 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetBibitem.cpp | 15 ++++++++++++--- src/insets/InsetBibitem.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp index 0de432b377..1e7d13972e 100644 --- a/src/insets/InsetBibitem.cpp +++ b/src/insets/InsetBibitem.cpp @@ -269,10 +269,19 @@ void InsetBibitem::updateLabels(ParIterator const & it) } -docstring InsetBibitem::xhtml(odocstream & os, OutputParams const &) const +docstring InsetBibitem::xhtml(XHTMLStream & xs, OutputParams const &) const { - os << ""; - os << "" << bibLabel() << " "; + // FIXME XHTML + // XHTML 1.1 doesn't have the "name" attribute for , so we have to use + // the "id" atttribute to get the document to validate. Probably, we will + // need to use "name" anyway, eventually, because some browsers do not + // handle jumping to ids. If we don't do that, though, we can just put the + // id into the span tag. + string const attrs = "id='" + to_utf8(getParam("key")) + "'"; + xs << CompTag("a", attrs); + xs << StartTag("span", "class='biblabel'"); + xs << bibLabel(); + xs << EndTag("span"); return docstring(); } diff --git a/src/insets/InsetBibitem.h b/src/insets/InsetBibitem.h index cc00d48d0b..b69e85f6cd 100644 --- a/src/insets/InsetBibitem.h +++ b/src/insets/InsetBibitem.h @@ -61,7 +61,7 @@ private: /// int plaintext(odocstream &, OutputParams const &) const; /// - docstring xhtml(odocstream &, OutputParams const &) const; + docstring xhtml(XHTMLStream &, OutputParams const &) const; /// virtual void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const; /// Update the counter of this inset -- 2.39.2