DocBook: use the right key when generating bibiomixed.

This commit is contained in:
Thibaut Cuvelier 2020-08-01 03:37:25 +02:00
parent 0c0613327c
commit 5324566013
5 changed files with 3398 additions and 5 deletions

View File

@ -6,9 +6,9 @@
<section>
<title>Publications</title>
<bibliography>
<bibliomixed id='1'>First Folio. </bibliomixed>
<bibliomixed id='2'>Second Folio. </bibliomixed>
<bibliomixed id='3'>Third Folio. </bibliomixed>
<bibliomixed xml:id='first'>First Folio. </bibliomixed>
<bibliomixed xml:id='second'>Second Folio. </bibliomixed>
<bibliomixed xml:id='third'>Third Folio. </bibliomixed>
</bibliography>
</section>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -346,7 +346,6 @@ void InsetBibitem::updateBuffer(ParIterator const & it, UpdateType utype, bool c
void InsetBibitem::docbook(XMLStream &, OutputParams const &) const
{
// Nothing to do: everything is implemented in makeParagraphBibliography.
return;
}

View File

@ -348,7 +348,7 @@ ParagraphList::const_iterator makeParagraphBibliography(
Inset const *ip = par->getInset(0);
if (ip != nullptr && ip->lyxCode() == BIBITEM_CODE) {
const auto * bibitem = dynamic_cast<const InsetBibitem*>(par->getInset(i));
attr = from_utf8("xml:id='") + bibitem->bibLabel() + from_utf8("'");
attr = from_utf8("xml:id='") + bibitem->getParam("key") + from_utf8("'");
break;
}
}