星期五, 8月 18, 2006

MARC::SAX

cpan -i XML::LibXML LWP::Simple XML::Simple

http://www.nntp.perl.org/group/perl.perl4lib/2369

Just providing an update on this issue. As you may
recall, I'vebeen putting the MARC::Record suite,
specifically MARC::File::XMLand MARC::Charset, through
some fairly rigourous tests, includinga 'roundtrip'
test, which converts the binary MARC-8 records to
MARCXML / UTF-8 and then back to binary MARC but
encoded as UTF-8.This test is available here:

http://liblime.com/public/roundtrip.pl


I discovered a number of bugs or issues, not in the
MARC::* stuff, but in theback-end SAX parsers. I'll
just summarize my discoveries here for posterity:

1. MARC::File::XML, if it encounteres unmapped
encoding in aMARC-8 encoded binary MARC file (in
as_xml()) will drop the entire subfield where the
improper encoding exists. The simple solution isto
always use: MARC::Charset->ignore_errors(1); if you
expect your
data will have improper encoding.

2. the XML::SAX::PurePerl parser cannot properly
handle combiningcharacters. I've reported this bug
here:

http://rt.cpan.org/Public/Bug/Display.html?id=19543


At the suggestion of several, I tried replacing my
default systemparser with expat, which cause another
problem:

3. handing valid UTF-8 encoded XML to new_from_xml()
sometimes causes the entire record to be destroyed
when using XML::SAX::Expat as the parser (with
PurePerl these seem to work). It fails with the error:

not well-formed (invalid token) at line 23, column 43,
byte 937 at /usr/lib/perl5/XML/Parser.pm line 187

I haven't been able to track the cause of this bug, I
eventually found a workaround that didn't result in
the above error, but instead,silently mangled the
resulting binary MARC record on the way out:

4. Using incompatible version of XML::SAX::LibXML and
libxml2 will cause binary MARC records to be mangled
when passed through new_from_xml() in some cases. The
solution here is to make sure you're running
compatible versions of XML::SAX::LibXML and libxml2. I
run Debian Sarge and when I just used the package
maintainer's versions it fixed the bug. It's unclear
to me why the binary MARC would be mangled, this may
indicate a problem with MARC::* but I haven't
had time to track it down and since installing
compatible versions of the parser back-end solves the
problem I can only assume it's the fault of the
incompatible parsers.

Issues #3 and #4 above can be replicated following
batch of records through the roundtrip.pl script
above:

http://liblime.com/public/several.mrc

If you want to test #2, try running this record
through roundtrip.pl:

http://liblime.com/public/combiningchar.mrc

BTW: you can change your default SAX parser by editing
the .ini file ... mine is located in
/usr/local/share/perl/5.8.4/XML/SAX/ParserDetails.ini

So the bottom line is, if you want to use
MARC::File::XML in any serious application, you've got
to use compatible versions of the
libxml2 parser and XML::SAX::LibXML. Check the README
in the perl package for documentation on which are
compatible...

Maybe a note somewhere in the MARC::File::XML
documentation to point these issues out would be
useful. Also, it wouldn't be too bad to have
a few tests to make sure that the system's default SAX
parser is capable of handling these cases. Just my two
cents.

星期六, 8月 05, 2006

koha 2.2.6RC2

... available for download at :
http://download.savannah.nongnu.org/releases/koha/

WARNING : this is a Release Candidate, so, if you decide to install it,
you must know that :
- some bugs may remain
- you MUST backup your database before updating
- you must know how to roll-back to previous version if things goes
wrong.

Otherwise, don't install it and wait for official 2.2.6 !

Release notes :
***************************************
RELEASE NOTES
=============

Koha is the first Open-Source Integrated Library System.
Released in New Zealand, in January 2000, it is maintained by a team of
volunteers from around the globe. The Koha system is a full catalogue,
opac, circulation and acquisitions system.

Koha 2.2.6 is more than 247 000 lines of code, developed by more than
30
differents developers (and even more translators).

With the 2.2.6 version, Koha is now a mature product, with a lot of
nice
features. It's used in more than 100 libraries, of all kinds (public,
schools, religious...), of different sizes (from 1 to 8 branches, from
1000 to 300 000 items).


========
WARNINGS
========
* The librarian interface is tested only with Mozilla/Firefox. Should
work (partially) with IE. OPAC should work fine with any browser.
* In this release, french & english are uptodate. Other language po
files are provided in the package. If you update/complete one of them,
please send it to paul.poulain @ free.fr, it will be included in a
2.2.6b release !
* NEW PACKAGES REQUIRED :
- Class::Accessor (0.25)
- XML::SAX (0.14)
- MARC::File::XML (0.83),
- MARC::Charset (0.95),
- LWP::Simple
- XML::Simple


KNOWN BUGS
**********
Critical/blocking : none
see bugs.koha.org for more information. Please report any problem in
bugs.koha.org

Apple users : it seems there is an annoying bug in Firefox, that you
can
have in librarian biblio search: only the first MARC field list is
available and the others can't be opened. The problem is described and
fixed at http://www.macfixit.com/article.php?story=20051226091140372

=======
CHANGES
=======
Changes 2.2.5 => 2.2.6
**********************

DB CHANGES
**********

DB structure : dewey field has been moved to a char(30)
DB content : many many new systempreferences
Koha opac stylesheets : none

BUGFIXES
=== CATALOGUING ===
* result page display was incorrect when searching a biblio before
adding a new one.
* no more saving of an empty field in the DB
* Fix for splitting up fixed fields containing | in them causing
incorrect storage of fixed fields in Koha DB.
* An item that is on loan can't be deleted anymore.

=== CIRCULATION ===
* minor bugfix : Adding 0 before days and months in order to make date
comparison work.

=== PARAMETERS ===
* adding page facility in book funds.


IMPROVEMENTS
Almost nothing has changed in the DB, so the stability should be good.
But you are warned that some/few bugs may occur.
Please READ the release notes. Everything is compatible with previous
versions, so, if you just install Koha, you should have the same
behaviour as previously, but you will miss many interesting features!

=== ACQUISITION ===
* added a (crontab) script : check_suggestion.pl, that send a mail to
the librarian when a suggestion is pending
* *MAJOR IMPROVEMENT* :
- online help has been added
- the order.pl page doesn't show baskets closed for more than 6 months
anymore.
- when recieving an order, you now see the list of existing parcels.
The
parcel code used to be the "Supplier invoice information". Now when you
go to the reciept page, you see all previous recieves, and can create a
new parcel, exactly as before. This does not require any change in Koha
internals, but we hope it's clearer than before.
- when recieving an order in a parcel, you now see all orders still
waiting for a receipt. Thus, you can enter isbn/title as previously, or
directly click on a title in the list.
We worked hard on those new acquisition screens, and hope that you'll
find it easier to use than before.

=== AUTHORITIES ===
* if the library doesn't define a summary for an authority, a
standard/default one will be built automatically.
* if the librarian set * as subfield, all subfields will be shown,
without any separator, but respecting the order. Previously, you had to
define every subfield, causing problems in case of reordered subfields.

=== CIRCULATION===
* added a (crontab) script : overduenoticesSelect.pl, that can be used
as replacement for the overduenotice script. This one has many more
parameters, including a filter on branches and an external letter (to
avoid the need to modify the script on each release)
* merged today & previous issues list during issuing. Added a button to
renew issues & return issues in 1 click

=== CATALOGUE ===
* highly improved MARC21 default framework
* new systempref "sortbynonfiling". If you catalogue with complete MARC
(including indicators), you can set this pref to Yes. It will remove
non
filing chars and order "The King Henry IV" to letter "K". This
systempref is USELESS for UNIMARC (as UNIMARC doesn't manage non-filing
chars in an indicator, unlike MARC21)

=== CATALOGUING ===
* added a (crontab) script : delete_authority.pl, that deletes all
entries of an authority in a biblio.
* *MAJOR IMPROVEMENT* in MARC editing :
- duplicating a field (+ on the tag) does not require a server call
anymore : it's much faster.
- duplicating a subfield is no longer done with a pipe (|), but by
clicking on the + facing the subfield
- the "hidden" property of the framework now has 19 possible values.
Look in the online help to see them. The immediate interesting value is
-1, which means the subfield is minimized on the MARC editor and you
must click on it to expand it. Rarely used fields/subfields are easier
to manage.
- a advancedMARCeditor systempref has been added. If set, tag/subfield
values are not shown, except when putting the mouse on the
tag/subfield.
This systempref is only for "MARC addicts"!
* MARC21 : many plugins have been added (by joshua). It seems you now
have as many plugins for fixed length fields in MARC21 as in UNIMARC!
Note that plugins help you filling a tag/subfield in the MARC editor.

=== MEMBERS ===
* patron images management. A new systempreference has been added
(patronimages, in borrowers section). If set (to an image extension,
like jpg or gif), the image will be shown on patron detail or
circulation page. The images must be stored in
KOHADIR/htdocs/intranet-tmpl/patronimages/ . The image must be named
. (1.jpg for example, for
borrower #1)

=== OPAC ===
Many preferences have been added to OPAC. Read them carefully, as you
will be able to modify highly the look and behaviour of your OPAC!
* new default stylesheet for css (purple on white). A new stylesheet
(contributed by liblime.com) has been added to show everybody the
changes in OPAC. If you want to stay with the old one (dark/light
green), just reach Koha >> Parameters >> Systempreferences >> OPAC >>
opacstylesheet > modify > /opac-tmpl/default/opac_old.css
* Amazon content : if the new AmazonContent systempref is set AND an
AmazonDevKey/AmazoneDevTag (available on www.amazon.com) is entered in
systempreferences AND XML::Simple package is installed, OPAC will show
amazon cover pages when available. Note that this feature may not be
legal everywhere. For example, it seems it may not be legal in France
(you must ask each editor for permission)
* new systempref : opaccredit. If something (including html) is stored
there, the footer of OPAC pages will contain what is there (instead of
the "Library powered by Koha..." that is on css default templates)
* new systempref : opacnav. In this preference, you can put any html
that will be added to your menu. For example, to add a button to reach
the koha website : title="Koha world website">Koha
* new systempref : opacbookbag : if set to 0, the basket/book bag
features will be hidden in OPAC (even for logged in users).
* authorities heading search : a new menu has been added so the user
can
search in authorities (same behaviour as in intranet)
* new systempref : opaclanguagesdisplay. If set to "yes" (default
value), the list of available language is shown. Otherwise, there is no
list, koha will stay in default language only.
* new systempref : opacreadinghistory. If set to "yes" (default value),
the reading history will be available on OPAC (for logged in users). If
set to "no", the reading history never appears.
* Recent Acquisition : added a new page to filter recent acquisitions
on
a given branch.
* if you use npl templates, you can have an alternate stylesheet (to
set
it, go to librarian interface >> Parameters > Systempreferences > OPAC
>
opacstylesheet > modify > /opac-tmpl/npl/en/includes/opac.liblime.css)
* when there is more than 1 item at a given location
(branch/callnumber/location), the list shows the number of items, not 1
line for each (same) value.

=== REPORTS ===
* Inventory : you can now scan in a text file, on an unconnected
laptop,
with every book in your library. Then, just upload the file in Koha. It
will "mark as seen" all books. Once you've scanned everything in your
library, just query for all books not seen since the beginning of the
inventory, and you'll get "lost" books.

=== SERIALS ===
* MAJOR IMPROVEMENT : Adding item creation on the fly when receiving
serial : if you activate systempref > Catalogue > serialsadditems,
you'll have a form to create an item on the fly at the end of the
serial
receipt form. The item contains the callnumber, the branch, the barcode
and the location (where applicable). Go to the catalogue after setting
a
serial to "arrived", and you should see the item created. If you let
serialsadditems to OFF, behaviour is unchanged from previous releases.
* the last 5 arrived serials are shown when receiving serials.