[Koha] Wrong SAX Parser - does it matter?

Mason James mason.loves.sushi at gmail.com
Wed Nov 12 14:18:45 NZDT 2008


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