use OpenILS::WWW::TemplateBatchBibUpdate qw( /openils/conf/opensrf_core.xml );
use OpenILS::WWW::EGWeb ('/openils/conf/oils_web.xml');
use OpenILS::WWW::PasswordReset ('/openils/conf/opensrf_core.xml');
-use OpenILS::WWW::IDL2js ('/openils/conf/opensrf_core.xml', '/openils/var/xsl/fm_IDL2js.xsl');
+use OpenILS::WWW::IDL2js ('/openils/conf/opensrf_core.xml');
# - Uncoment the following 2 lines to make use of the IP redirection code
# - The IP file should to contain a map with the following format:
sub import {
my $self = shift;
$bs_config = shift;
- my $xsl_file = shift;
+}
+
+# parse the IDL, loaded from the network
+my $__initted = 0;
+sub child_init {
+ $__initted = 1;
+
+ OpenSRF::System->bootstrap_client(config_file => $bs_config);
+ my $sclient = OpenSRF::Utils::SettingsClient->new();
+
+ my $xsl_file = $sclient->config_value('IDL2js');
+
+ unless($xsl_file) {
+ warn "XSL2js XSL file required for IDL2js Apache module\n";
+ return;
+ }
+
+ $xsl_file = $sclient->config_value(dirs => 'xsl')."/$xsl_file";
+ my $idl_file = $sclient->config_value("IDL");
my $xslt = XML::LibXSLT->new();
my $e = shift;
warn "Invalid XSL File: $xsl_file: $e\n";
};
-}
-# parse the IDL, loaded from the network
-my $__initted = 0;
-sub child_init {
- $__initted = 1;
- OpenSRF::System->bootstrap_client(config_file => $bs_config);
- my $sclient = OpenSRF::Utils::SettingsClient->new();
- my $idl_file = $sclient->config_value("IDL");
$idl_doc = XML::LibXML->load_xml(location => $idl_file);
}