Restore XHTML output for InsetBibitem.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32257 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-11-30 22:28:54 +00:00
parent a144ccd92c
commit d3365ebbe7
2 changed files with 13 additions and 4 deletions

View File

@ -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 << "<a name='" << html::htmlize(getParam("key")) << "'></a>";
os << "<span class='biblabel'>" << bibLabel() << "</span> ";
// FIXME XHTML
// XHTML 1.1 doesn't have the "name" attribute for <a>, 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();
}

View File

@ -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