[Koha-devel] [Koha] Wrong SAX Parser - does it matter? -> impact on Debian packaging

Vincent Danjean vdanjean.ml at free.fr
Fri Nov 14 21:13:06 CET 2008


[moving from koha to koha-devel due to my questions]

Mason James wrote:
> On 2008/11/12, at 11:56 AM, Brendan Gallagher wrote:
>> Did you try editing ParserDetails.ini

What I do not understand is why koha is requiring to modify such
a global configuration file.

Is this setup really still required ? Were not the bugs from the
expat filter fixed ? I do not know at all why this parser is/was needed,
but Expact seems to work for the test case in koha scripts :
vdanjean koha/misc$ ./sax_parser_print.pl
XML::SAX::Expat=HASH(0x115c4f0)
vdanjean koha/misc$ ./sax_parser_test.pl
é
vdanjean koha/misc
)

By the way, this kind of requirement is really a bad thing (with my
hat of trying to make a official Debian package) => it will be NOT
possible at all that the koha package modifies the global configuration
file.
However, I really do not understand why, if the SAX parser is really
needed, it is not required in the koha code itself.

For example, I tried to add as the first line in sax_parser_print.pl
and sax_parser_test.pl the line:
$XML::SAX::ParserPackage = "XML::LibXML::SAX";
(tip found in the doc of XML::SAX::ParserFactory)
Without changing my global configuration file, sax_parser_print.pl
now report XML::LibXML::SAX.

I failed to see where koha really instantiate a sax parser.
'rgrep "use XML::SAX" koha/' does not return anything (but
sax_parser_print.pl and sax_parser_test.pl).

Perhaps, koha gurus can know where SAX parser are used and add
the line requesting the particular parser if it is still needed ?

  Regards,
    Vincent

-- 
Vincent Danjean       GPG key ID 0x9D025E87         vdanjean at debian.org
GPG key fingerprint: FC95 08A6 854D DB48 4B9A  8A94 0BF7 7867 9D02 5E87
Unofficial pacakges: http://www-id.imag.fr/~danjean/deb.html#package
APT repo:  deb http://perso.debian.org/~vdanjean/debian unstable main




More information about the Koha-devel mailing list