1 --Upgrade Script for 2.10.10 to 2.10.11
2 \set eg_version '''2.10.11'''
5 SELECT evergreen.upgrade_deps_block_check('1030', :eg_version);
7 CREATE OR REPLACE FUNCTION evergreen.oils_xslt_process(TEXT, TEXT) RETURNS TEXT AS $func$
16 # The following approach uses the older XML::LibXML 1.69 / XML::LibXSLT 1.68
17 # methods of parsing XML documents and stylesheets, in the hopes of broader
18 # compatibility with distributions
19 my $parser = $_SHARED{'_xslt_process'}{parsers}{xml} || XML::LibXML->new();
21 # Cache the XML parser, if we do not already have one
22 $_SHARED{'_xslt_process'}{parsers}{xml} = $parser
23 unless ($_SHARED{'_xslt_process'}{parsers}{xml});
25 my $xslt_parser = $_SHARED{'_xslt_process'}{parsers}{xslt} || XML::LibXSLT->new();
27 # Cache the XSLT processor, if we do not already have one
28 $_SHARED{'_xslt_process'}{parsers}{xslt} = $xslt_parser
29 unless ($_SHARED{'_xslt_process'}{parsers}{xslt});
31 my $stylesheet = $_SHARED{'_xslt_process'}{stylesheets}{$xslt} ||
32 $xslt_parser->parse_stylesheet( $parser->parse_string($xslt) );
34 $_SHARED{'_xslt_process'}{stylesheets}{$xslt} = $stylesheet
35 unless ($_SHARED{'_xslt_process'}{stylesheets}{$xslt});
37 return $stylesheet->output_as_chars(
38 $stylesheet->transform(
39 $parser->parse_string($doc)
43 $func$ LANGUAGE 'plperlu' STRICT IMMUTABLE;