From 3c6014b36fc3a5be77e419ad40b96a25b742ea95 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Fri, 3 Mar 2006 17:08:59 +0000 Subject: [PATCH] better validation error --- zypp/parser/XMLNodeIterator.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/zypp/parser/XMLNodeIterator.cc b/zypp/parser/XMLNodeIterator.cc index 9984bf2..d12cc22 100644 --- a/zypp/parser/XMLNodeIterator.cc +++ b/zypp/parser/XMLNodeIterator.cc @@ -130,11 +130,15 @@ namespace zypp { { xmlTextReaderSetErrorHandler(_reader, (xmlTextReaderErrorFunc) errorHandler, this); // xmlTextReaderSetStructuredErrorHandler(_reader, structuredErrorHandler, this); - if (_reader && validationPath) - if (xmlTextReaderRelaxNGValidate - (_reader,validationPath)==-1) - WAR << "Could not enable validation of document" << std::endl; - + if (_reader ) + { + if ( validationPath ) + { + if (xmlTextReaderRelaxNGValidate(_reader,validationPath)==-1) + WAR << "Could not enable validation of document using " << validationPath << std::endl; + } + // otherwise validation is disabled. + } /* Derived classes must call fetchNext() in their constructors themselves, XMLNodeIterator has no access to their virtual functions during construction */ -- 2.7.4