*** pgsql/contrib/xml2/xslt_proc.c 2009/07/10 00:32:29 1.3.4.1 --- pgsql/contrib/xml2/xslt_proc.c 2010/03/01 03:41:29 1.3.4.2 *************** *** 21,42 **** #include ! /* declarations to come from xpath.c */ ! extern void elog_error(int level, char *explain, int force); ! extern void pgxml_parser_init(); ! extern xmlChar *pgxml_texttoxmlchar(text *textstring); ! #define GET_STR(textp) DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(textp))) /* local defs */ static void parse_params(const char **params, text *paramstr); - Datum xslt_process(PG_FUNCTION_ARGS); - - #define MAXPARAMS 20 /* must be even, see parse_params() */ PG_FUNCTION_INFO_V1(xslt_process); --- 21,41 ---- #include ! /* externally accessible functions */ ! Datum xslt_process(PG_FUNCTION_ARGS); ! /* declarations to come from xpath.c */ ! extern void elog_error(const char *explain, bool force); ! extern void pgxml_parser_init(void); /* local defs */ static void parse_params(const char **params, text *paramstr); #define MAXPARAMS 20 /* must be even, see parse_params() */ + #define GET_STR(textp) DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(textp))) + PG_FUNCTION_INFO_V1(xslt_process); *************** xslt_process(PG_FUNCTION_ARGS) *** 82,88 **** if (doctree == NULL) { xmlCleanupParser(); ! elog_error(ERROR, "Error parsing XML document", 0); PG_RETURN_NULL(); } --- 81,87 ---- if (doctree == NULL) { xmlCleanupParser(); ! elog_error("Error parsing XML document", false); PG_RETURN_NULL(); } *************** xslt_process(PG_FUNCTION_ARGS) *** 96,102 **** { xmlFreeDoc(doctree); xmlCleanupParser(); ! elog_error(ERROR, "Error parsing stylesheet as XML document", 0); PG_RETURN_NULL(); } --- 95,101 ---- { xmlFreeDoc(doctree); xmlCleanupParser(); ! elog_error("Error parsing stylesheet as XML document", false); PG_RETURN_NULL(); } *************** xslt_process(PG_FUNCTION_ARGS) *** 111,117 **** xmlFreeDoc(doctree); xsltCleanupGlobals(); xmlCleanupParser(); ! elog_error(ERROR, "Failed to parse stylesheet", 0); PG_RETURN_NULL(); } --- 110,116 ---- xmlFreeDoc(doctree); xsltCleanupGlobals(); xmlCleanupParser(); ! elog_error("Failed to parse stylesheet", false); PG_RETURN_NULL(); }