allow to configure the maximum number of nested template calls and variables/params
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 8 Apr 2010 09:56:33 +0000 (09:56 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 8 Apr 2010 09:56:33 +0000 (09:56 +0000)
e.g. <your_script>.pl

   $ZOOM::IRSpy::xslt_max_depth = 500;

lib/ZOOM/IRSpy.pm

index 243c153..0a4614a 100644 (file)
@@ -23,6 +23,7 @@ use ZOOM::IRSpy::Utils qw(cql_target render_record
 our @ISA = qw();
 our $VERSION = '1.01';
 our $irspy_to_zeerex_xsl = dirname(__FILE__) . '/../../xsl/irspy2zeerex.xsl';
 our @ISA = qw();
 our $VERSION = '1.01';
 our $irspy_to_zeerex_xsl = dirname(__FILE__) . '/../../xsl/irspy2zeerex.xsl';
+our $xslt_max_depth = 250;
 
 
 # Enumeration for callback functions to return
 
 
 # Enumeration for callback functions to return
@@ -78,7 +79,7 @@ sub new {
     my $xslt = new XML::LibXSLT;
 
     # raise the maximum number of nested template calls and variables/params (default 250)
     my $xslt = new XML::LibXSLT;
 
     # raise the maximum number of nested template calls and variables/params (default 250)
-    $xslt->max_depth(250);
+    $xslt->max_depth($xslt_max_depth);
 
     $xslt->register_function($ZOOM::IRSpy::Utils::IRSPY_NS, 'strcmp',
                              \&ZOOM::IRSpy::Utils::xslt_strcmp);
 
     $xslt->register_function($ZOOM::IRSpy::Utils::IRSPY_NS, 'strcmp',
                              \&ZOOM::IRSpy::Utils::xslt_strcmp);