--- parser3/src/classes/xdoc.C 2003/12/10 14:17:43 1.124 +++ parser3/src/classes/xdoc.C 2004/01/22 09:34:05 1.128 @@ -9,7 +9,7 @@ #ifdef XML -static const char * const IDENT_XDOC_C="$Date: 2003/12/10 14:17:43 $"; +static const char * const IDENT_XDOC_C="$Date: 2004/01/22 09:34:05 $"; #include "gdome.h" #include "libxml/tree.h" @@ -413,7 +413,7 @@ static void _create(Request& r, MethodPa Temp_lang temp_lang(r, String::L_XML); const String& xml=r.process_to_string(param); - const char* cstr=xml.cstr(String::L_UNSPECIFIED); + const char* cstr=xml.cstr(String::L_UNSPECIFIED, 0, &r.charsets); document=(GdomeDocument *) gdome_xml_n_mkref((xmlNode *)xmlParseMemory( cstr, strlen(cstr) @@ -819,9 +819,6 @@ static void _transform(Request& r, Metho static_cast(vxdoc)->get_document()); // compile xdoc stylesheet xsltStylesheet_auto_ptr stylesheet_ptr(xsltParseStylesheetDoc(document)); - // strange thing - xsltParseStylesheetDoc records document and destroys it in stylesheet destructor - // we don't need that - stylesheet_ptr->doc=0; if(xmlHaveGenericErrors()) { GdomeException exc=0; throw XmlException(0, exc); @@ -830,6 +827,9 @@ static void _transform(Request& r, Metho throw Exception("xml", 0, "stylesheet failed to compile"); + // strange thing - xsltParseStylesheetDoc records document and destroys it in stylesheet destructor + // we don't need that + stylesheet_ptr->doc=0; // transform! result=&_transform(r, 0, @@ -839,7 +839,7 @@ static void _transform(Request& r, Metho // extablish stylesheet connection const String& stylesheet_filespec= r.absolute(params.as_string(0, "stylesheet must be file name (string) or DOM document (xdoc)")); - Stylesheet_connection_ptr connection=stylesheet_manager.get_connection(stylesheet_filespec); + Stylesheet_connection_ptr connection=stylesheet_manager->get_connection(stylesheet_filespec); // load and compile file to stylesheet [or get cached if any] // transform!