1 --Upgrade Script for 2.11.3 to 2.11.4
2 \set eg_version '''2.11.4'''
4 INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.11.4', :eg_version);
6 SELECT evergreen.upgrade_deps_block_check('1030', :eg_version);
8 CREATE OR REPLACE FUNCTION evergreen.oils_xslt_process(TEXT, TEXT) RETURNS TEXT AS $func$
17 # The following approach uses the older XML::LibXML 1.69 / XML::LibXSLT 1.68
18 # methods of parsing XML documents and stylesheets, in the hopes of broader
19 # compatibility with distributions
20 my $parser = $_SHARED{'_xslt_process'}{parsers}{xml} || XML::LibXML->new();
22 # Cache the XML parser, if we do not already have one
23 $_SHARED{'_xslt_process'}{parsers}{xml} = $parser
24 unless ($_SHARED{'_xslt_process'}{parsers}{xml});
26 my $xslt_parser = $_SHARED{'_xslt_process'}{parsers}{xslt} || XML::LibXSLT->new();
28 # Cache the XSLT processor, if we do not already have one
29 $_SHARED{'_xslt_process'}{parsers}{xslt} = $xslt_parser
30 unless ($_SHARED{'_xslt_process'}{parsers}{xslt});
32 my $stylesheet = $_SHARED{'_xslt_process'}{stylesheets}{$xslt} ||
33 $xslt_parser->parse_stylesheet( $parser->parse_string($xslt) );
35 $_SHARED{'_xslt_process'}{stylesheets}{$xslt} = $stylesheet
36 unless ($_SHARED{'_xslt_process'}{stylesheets}{$xslt});
38 return $stylesheet->output_as_chars(
39 $stylesheet->transform(
40 $parser->parse_string($doc)
44 $func$ LANGUAGE 'plperlu' STRICT IMMUTABLE;