[greenstone-devel] Creator metadata sorting

From Stephen.DeGabrielle@ntu.edu.au
DateWed, 9 Jul 2003 15:39:22 +0930
Subject [greenstone-devel] Creator metadata sorting
We have noticed our sorting going a bit funny when we use the DC 'Creator'
metadata tag; it calls sorttools.pm;

-from sorttools.pm--
# format an english name for sorting
# i.e. convert to lowercase, put surname before
# first names etc.
sub format_string_name_english {
my ($stringref) = @_;

$$stringref =~ tr/A-Z/a-z/;
$$stringref =~ s/&S+;//g;

my $comma_format = ($$stringref =~ m/^.+,.+$/);

$$stringref =~ s/[^a-z0-9 ]//g;
$$stringref =~ s/s+/ /g;
$$stringref =~ s/^s+//;

if (!$comma_format) {
# No commas in name => name in 'firstname surname' format
# need to sort by surname
my @names = split / /, $$stringref;
my $surname = pop @names;
while (scalar @names && $surname =~ /^(jnr|snr)$/i) {
$surname = pop @names;
$$stringref = $surname . " " . $$stringref;
sorttools.pm seems to fail to detect the comma in our author data.
Here is an example of the default creator name sorting as sorted by

Lindgren, K. E. (Kevin Edmund), 1940-

Latimer, Paul, 1947-

Vermeesch, R. B. (Robert Bryan)

Trotter, Chris

Thwaites, Tony G. (Anthony Guy)

Srivastava, Dhirendra K. (Dhirendra Kumar)

Davis, Lloyd

Thomson, Neil

Singh, P.

Kakadu National Park

Deklin, T.

Mules, Warwick

While we can change to another metadata tag for our creator metadata we
would prefer to stick to the DC standard - I have edited AZCompactlist.pm
to get the correct behaviour but this is really a pretty bad fudge - I
could do a switch to turn of this behaviour for the Creator metadata tag or
is there a better option?

Thanks for your help,

Stephen De Gabrielle

"Creators should be listed separately in the same order that they appear in
the publication. Personal names should be listed surname or family name
first, followed by forename or given name. When in doubt, give the name as
it appears, and do not invert."