@@ -33,6 +33,14 @@ bool ValidateSchema::init(const std::string &file, const char **error) {
3333 return false ;
3434 }
3535
36+ return true ;
37+ }
38+
39+
40+ bool ValidateSchema::evaluate (Transaction *t,
41+ const std::string &str) {
42+ int rc;
43+
3644 m_parserCtx = xmlSchemaNewParserCtxt (m_resource.c_str ());
3745 if (m_parserCtx == NULL ) {
3846 std::stringstream err;
@@ -42,8 +50,8 @@ bool ValidateSchema::init(const std::string &file, const char **error) {
4250 if (m_err.empty () == false ) {
4351 err << m_err;
4452 }
45- *error = strdup ( err.str (). c_str ());
46- return false ;
53+ t-> debug ( 4 , err.str ());
54+ return true ;
4755 }
4856
4957 xmlSchemaSetParserErrors (m_parserCtx,
@@ -65,9 +73,9 @@ bool ValidateSchema::init(const std::string &file, const char **error) {
6573 if (m_err.empty () == false ) {
6674 err << " " << m_err;
6775 }
68- *error = strdup ( err.str (). c_str ());
76+ t-> debug ( 4 , err.str ());
6977 xmlSchemaFreeParserCtxt (m_parserCtx);
70- return false ;
78+ return true ;
7179 }
7280
7381 m_validCtx = xmlSchemaNewValidCtxt (m_schema);
@@ -76,18 +84,10 @@ bool ValidateSchema::init(const std::string &file, const char **error) {
7684 if (m_err.empty () == false ) {
7785 err << " " << m_err;
7886 }
79- *error = strdup ( err.str (). c_str ());
80- return false ;
87+ t-> debug ( 4 , err.str ());
88+ return true ;
8189 }
8290
83- return true ;
84- }
85-
86-
87- bool ValidateSchema::evaluate (Transaction *t,
88- const std::string &str) {
89- int rc;
90-
9191 /* Send validator errors/warnings to msr_log */
9292 xmlSchemaSetValidErrors (m_validCtx,
9393 (xmlSchemaValidityErrorFunc)error_runtime,
0 commit comments