Wrong SAX Parser - does it matter?
Hello, I'm installing Koha 3 on Ubuntu 8.10. When I try this: # ./misc/sax_parser_print.pl .instead of the expected "XML::LibXML::SAX::Parser=." I get "XML::SAX::Expat=.". Does it matter? A few days ago I made it through a Koha install this way and things seemed to work fine anyway. Will this lead to subtle errors if I don't fix it? 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 ----------------------------------------------------------------- Andy Giesler University of Wisconsin-Madison
Hi Andy - Did you try editing ParserDetails.ini I've found a few different entries listed there. This is copied from one of the installation guides found with Koha install... You must be sure you’re using the XML::LibXML SAX parser, not Expat or PurePerl, both of which have outstanding bugs with pre-composed characters. If you’re using PurePerl (you probably are) or Expat, you’ll need to edit your ParserDetails.ini file to use the LibXML Parser Edit this ParserDetails.ini file (with vim or other editor) See if the first line contains this: [XML::SAX::PurePerl] If it does, replace this first line by the following: [XML::LibXML::SAX::Parser] Cheers, Brendan On Nov 11, 2008, at 4:44 PM, agiesler@wisc.edu wrote:
Hello,
I’m installing Koha 3 on Ubuntu 8.10. When I try this:
# ./misc/sax_parser_print.pl
…instead of the expected “XML::LibXML::SAX::Parser=…” I get “XML::SAX::Expat=…”. Does it matter? A few days ago I made it through a Koha install this way and things seemed to work fine anyway. Will this lead to subtle errors if I don’t fix it?
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
----------------------------------------------------------------- Andy Giesler University of Wisconsin-Madison _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
++++++++++++++++++++++++++++++++++++ Brendan A. Gallagher Software Services Coordinator Bibliomation INC. 32 Crest Rd. Middlebury, CT 06762 ++++++++++++++++++++++++++++++++++++
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!!
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@gmail.com] Sent: Tuesday, November 11, 2008 7:19 PM To: Brendan Gallagher Cc: agiesler@wisc.edu; Koha@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!!=
agiesler@wisc.edu a écrit :
Hello, …instead of the expected “XML::LibXML::SAX::Parser=…” I get “XML::SAX::Expat=…”. Does it matter? A few days ago I made it through a Koha install this way and things seemed to work fine anyway. Will this lead to subtle errors if I don’t fix it?
it's 'just" a matter of how diacritics are handled. If you strictly have only english strings in your DB (no é, à, ç or chinese, arab, japanese...), then you could probably continue with your SAX::Parser but at the 1st non-English character you'll enter, you'll see that the problem is not subtle ;-) So, you should probably fix the problem to avoid asking yourself "what happens with my é" in 2 years (were you'll have forgotten this Parser subtlety ;-) -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc NOUVEAU TELEPHONE : 04 91 81 35 08
participants (4)
-
agiesler@wisc.edu -
Brendan Gallagher -
Mason James -
Paul POULAIN