pkp / ots

PKP XML Parsing Service
GNU General Public License v3.0
32 stars 19 forks source link

Ref id is being discarded when merging XML in Bibtexreferences modules #50

Closed axfelix closed 8 years ago

axfelix commented 8 years ago

When we replace the <ref> elements with the parscit output in https://github.com/pkp/xmlps/blob/master/module/BibtexreferencesConversion/src/BibtexreferencesConversion/Model/Converter/Bibtexreferences.php#L245 it uses the LastInitialFirstName from the BibTeX as the new ref id, eg PMSadler. This is an oversight -- the ref id attribute from the original document should be retained when the tag value is replaced so that Pandoc can match references later on (and we can evaluate our accuracy on this).

Unfortunately we can't just change this in any of the XSLs that were called (which would be slightly easier), as those don't have access to the original ref ids after they go through the whole parscit/bibutils chain. However, it's possible to get the old ref IDs out of the NLMXML stage document, which is already loaded by the BIbtexreferences job; it'll just require some DOM manipulation.

axfelix commented 8 years ago

Merged and done!