On Fri, Sep 12, 2014 at 7:32 AM, Jason Stirnaman <[log in to unmask]> wrote:
> Thanks, Steve! Thought I had tried that, but it's exactly what I was looking for.
One caveat though -- at least in MARC21, re-sorting a MARC record
strictly by tag number can be incorrect for certain fields. For
example, 6XX fields are meant to be ordered by the significance that
the cataloger assigns to each subject heading.
Here's a contrived example -- a book that is about textual criticism
in general but which contains extensive examples about Biblical and
Shakespearan textual criticism:
650 $a Criticism, Textual
630 $a Bible $x Criticism, Textual.
600 $a Shakespeare, William, $d 1564-1616 $x Criticism, Textual
Sorting the 6XX in numerical order would be incorrect, strictly speaking.
Similarly, notes fields (5XX) can be entered in AACR2 order, which
doesn't necessarily correspond to numeric tag order.
I can't speak to the specifics, not being well-versed in Ruby, but
assuming that the underlying sort is stable, you might want to use a
custom comparator that leaves the relative 5XX and 6XX field order
Manager of Implementation
Equinox Software, Inc. / The Open Source Experts
email: [log in to unmask]
direct: +1 770-709-5581
cell: +1 404-984-4366
Supporting Koha and Evergreen: http://koha-community.org &