Buglet in risx handling of journal custom abbreviations

Luc Pardon <[email protected]>
Newsgroups gmane.text.refdb.devel
Organization Skopos Consulting, Belgium
Message-ID <[email protected]>
Hello,

   The DTD (and the docs) lists the allowed values for the title type
attribute as : abbrev, full, gen, user1, user2.

   However, at lines 744 and 757 of risxhandler.c (distro of 0.9.4 and
in CVS as rev. 1.28), it tests for custabbrev1 and custabbrev2 instead
of user1 and user2.

   Consequences:

	* when using custabbrev1/2 (as per the source) the XML doesn't validate
against the risx DTD
	* when using cust1/2 (as per the DTD), the contents of these fields are
used as the title of the article, overwriting the real title from the
"part" element in the database. Hence the title is lost.

   The latter is particularly bad, and it occurs because on line 770
there is a catch-all "else" clause that kicks in if the type attribute
is not full, abbrev, custabbrev1 or custabbrev2.

   Suggested changes:

	1) match DTD and source. If you change the DTD, it might be a good idea
to test for "customabbrev1 OR "cust1", for compatibility with the
current DTD.

	2) change the catch-all "else" to read "else if type = "gen"" (in
pseusdo-code <g>)

	3) add a new catch-all to yield an error saying "invalid title type"
   

   Note: the overwriting of the title seems to be dependent on a) the
relative order of the part and publication elements and b) the presence
or not of author elements inside the publication element. 

   I can provide a test case if desired.

   I have created bug report 949697 for this as well.

   Best regards,

   Luc Pardon


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.