Package: bibutils
Version: 3.40-4
Severity: normal
Tags: patch upstream

According to the NCBI standard Medline format [1], the first name of the
authors are specified by the <FirstName> SGML tag.  The med2xml program does
not comply with the specification, because the code in lib/medlin.c wrongly
uses the <ForeName> tag.  

In the debdiff file attached below you will find the quilt patch 
debian/patches/medline-author-firstname.patch that fixes the problem.
Please, apply it to the Debian package and feel free to forward it to the
upstream author.

Last note: I checked the code for release 3.43 of bibutils [2] and the bug is
still present.

[1] http://xml.coverpages.org/ncbiPubFormat.html
[2] http://www.scripps.edu/~cdputnam/software/bibutils/bibutils_3.43_src.tgz

Thanks,

Rafael Laboissiere

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (650, 'unstable'), (600, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-3-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US (charmap=UTF-8) (ignored: LC_ALL set 
to en_US.UTF-8)

Versions of packages bibutils depends on:
ii  libbibutils0                  3.40-4     bibliography file converter, share
ii  libc6                         2.7-3      GNU C Library: Shared libraries

bibutils recommends no packages.

-- no debconf information

diff -u bibutils-3.40/debian/changelog bibutils-3.40/debian/changelog
--- bibutils-3.40/debian/changelog
+++ bibutils-3.40/debian/changelog
@@ -1,3 +1,11 @@
+bibutils (3.40-4.1) UNRELEASED; urgency=low
+
+  * debian/patches/medline-author-firstname.patch: Use FirstName instead
+    of ForeName tag in the Author record, which is the correct SGML tag
+    name according to the NCBI Medline format specification.
+
+ -- Rafael Laboissiere <[EMAIL PROTECTED]>  Wed, 26 Nov 2008 13:34:04 +0100
+
 bibutils (3.40-4) unstable; urgency=low
 
   * added reftypes.h (Closes: #477654)
diff -u bibutils-3.40/debian/patches/series bibutils-3.40/debian/patches/series
--- bibutils-3.40/debian/patches/series
+++ bibutils-3.40/debian/patches/series
@@ -6,0 +7 @@
+medline-author-firstname.patch
only in patch2:
unchanged:
--- bibutils-3.40.orig/debian/patches/medline-author-firstname.patch
+++ bibutils-3.40/debian/patches/medline-author-firstname.patch
@@ -0,0 +1,27 @@
+Use FirstName instead of ForeName tag in the Author record, which is the
+correct SGML tag name according to the NCBI Medline format specification
+(see http://xml.coverpages.org/ncbiPubFormat.html).
+
+ -- Rafael Laboissiere <[EMAIL PROTECTED]>  Wed, 26 Nov 2008 13:34:04 +0100
+
+--- a/lib/medin.c
++++ b/lib/medin.c
+@@ -201,8 +201,7 @@
+ /* <AuthorList CompleteYN="Y">
+  *    <Author>
+  *        <LastName>Barondeau</LastName>
+- *        <ForeName>David P</ForeName>
+- *        <Initials>DP</Initials>
++ *        <FirstName>David P</FirstName>
+  *    </Author>
+  * </AuthorList>
+  */
+@@ -216,7 +215,7 @@
+                       newstr_prepend( name, node->value->data );
+               }
+               else newstr_strcat( name, node->value->data );
+-      } else if ( xml_tagexact( node, "ForeName" ) ) {
++      } else if ( xml_tagexact( node, "FirstName" ) ) {
+               p = node->value->data;
+               while ( p && *p ) {
+                       if ( name->len ) newstr_addchar( name, '|' );

Reply via email to