[Koha] Wrong SAX Parser - does it matter?

agiesler at wisc.edu agiesler at wisc.edu
Thu Nov 13 05:12:50 NZDT 2008


Thank you Brendan, James, and Paul.

For future reference, here's what I found:

1. Following the instructions from the Koha install guide (i.e., moving
[XML::LibXML::SAX::Parser] to the top of the ParserDetails.ini file) didn't
resolve the problem.

2. "Locate" did indeed reveal two ParserDetails.ini files, but Debian and
CPAN must have decided to stop fighting recently:
/usr/share/perl5/XML/SAX/ParserDetails.ini was already configured as a
symbolic link to /etc/perl/XML/SAX/ParserDetails.ini, eliminating the
duplication. 

3. The magical fix was Brendan's last suggestion, moving the
[XML::LibXML::SAX] reference to the *bottom* of the file. 


----------------------------------------

Andy Giesler
www.blazingmoon.org
University of Wisconsin-Madison



-----Original Message-----
From: Mason James [mailto:mason.loves.sushi at gmail.com] 
Sent: Tuesday, November 11, 2008 7:19 PM
To: Brendan Gallagher
Cc: agiesler at wisc.edu; Koha at lists.katipo.co.nz
Subject: Re: [Koha] Wrong SAX Parser - does it matter?


On 2008/11/12, at 11:56 AM, Brendan Gallagher wrote:

> Hi Andy -
>
> Did you try editing ParserDetails.ini
>
> I've found a few different entries listed there.
>



>> I've read this post (http://www.nabble.com/XML::LibXML-problem- 
>> td19159082.html) but I still don't see the expected parser string.  
>> Before trying the script I've done all of these:
>>
>>     # apt-get install libgdbm-dev
>>     # apt-get install libxml-libxml-perl
>>     # cpan XML::LibXSLT
>>     # cpan XML::LibXML
>>     # cpan XML::LibXML::SAX
>>     # cpan XML::LibXML::SAX::Parser
>>


I have been bitten by this on a few installs, so i thought I'd reply..



the issue (as i remember it) is that debian|ubuntu and cpan both  
fight over the 'ParserDetails.ini' location


if you do a locate, youll find there are 2 copies of the file, both  
different??
one created by debian-package, one created by cpan



$ locate ParserDetails.ini
/etc/perl/XML/SAX/ParserDetails.ini
/usr/share/perl5/XML/SAX/ParserDetails.ini

so, make sure they are the same (or symlink/delete one of them??)


next, have the [XML::LibXML::SAX] block at the *bottom* of the file


$ cat /etc/perl/XML/SAX/ParserDetails.ini
--------------------------------------------------------
[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1


[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces = 1


[XML::LibXML::SAX]
http://xml.org/sax/features/namespaces = 1
--------------------------------------------------------


then test....

$ perl ./misc/sax_parser_print.pl
XML::LibXML::SAX=HASH(0x81fe548)                          <<<<<  
CORRECT PARSER, YAY!!=



More information about the Koha mailing list