[Koha-devel] Code Cleaning : Authorities.

Henri-Damien LAURENT laurenthdl at alinto.com
Thu Apr 5 18:02:41 CEST 2007


Those first two are the main reason I am writing.

Does anyone still use thesaurus.pl ?

Considering that now frameworks allow to link Authorities with one
another, I think we should drop linker down.

One problem is :
All linking and hierarchy code is UNIMARC and hardcoded.
I would like to allow more versatility on this.
But this would require those new system preferences :
  relation type subfield (UNIMARC 2)
  relation authnumber subfield (UNIMARC 3)
  relation authtype subfield (we should agree on using authtypes or
authtypecode as value in those subfields) (UNIMARC 5)
  relation tag (UNIMARC 550)
  child flag (UNIMARC f)
  mother flag (UNIMARC "g")
Plus would require some little modifications of auth_finder to enable
relation Choice.
Maybe it could interesting to enable multiple authority link for a field.
This would only require to manage a list of authorities to search in.

We reviewed the AuthoritiesMARC code with Paul.
And thought that unification between Authorities.pm and Biblio.pm was
not a worth the work.
a) Authorities search is much different from biblio search.
b) inner tables differs so that it would oblige us to make heavier
functions.

So Authorities Will stay as such.

While Code cleaning it, some questions remains.
GetSummary as well as Buildhererarchies is still quite customer
dependant and used for display. But it Hardcodes some HTML preprinting.
So that when people want This or that display, one has to modify a
C4/AuthoritiesMARC.
For instance :
One wants that term list are displayed :
/Heading/
BT /Broader Term/
NT /Narrower Term/
UF /Used For/
/Comments./

Another wants that term list are displayed :
/Heading/
TG /Broader Term/
TS /Narrower Term/
EP /Used For/
Comments : /Comments/.

Another wants only 
Heading$a -- Heading$b -- Heading$z

And we have to make little changes to the code and then upgrading
process is harder.

Solution ?
A) Using xslt ?
B) using HTML::Template to "simulate xslt" Then ppl would only have to
modify template for summary
processing "mini" template on each record.
C) keeping this as such.

This would also be helpful in getting information for search resultlists
in biblios more user adapted.
Comments welcome.
-- 
Henri-Damien LAURENT





More information about the Koha-devel mailing list