Bug #2673
closedreturning validation with getValidationReport
100%
Description
Testing validate and then SchemaValidatior::getValidationReport
After setting up and calling validate everytihng seems ok. Then trying to retrieve the results with getValidationReport causes a jet crash
@
#include
#include //std::system
#include
#include
#include
#include <condition_variable>
#include
#include
#include
#include "SchemaValidator.h"
#include "XdmNode.h"
//Main function.
int main(int argc, char *argv[])
{
std::shared_ptr processor(new SaxonProcessor(true));
std::shared_ptr schemaValidator(processor->newSchemaValidator());
schemaValidator->registerSchemaFromFile("/home/roger/NodeProjects/saxon-node/test/examples/query/books.xsd");
std::cout<<"validate... "<<std::endl;
schemaValidator->validate("/home/roger/NodeProjects/saxon-node/test/examples/query/books.xml");
//XdmNode* vp=schemaValidator->validateToNode("/home/roger/NodeProjects/saxon-node/test/examples/query/books.xml");
std::cout<<"getValidationReport... "<<std::endl;
XdmNode* vp=schemaValidator->getValidationReport();
std::cout<<"vp size "<size()<<std::endl;
std::cout<<"vp\n "<getStringValue()<<std::endl;
return 0;
}
@
https://github.com/rimmartin/saxon-node/tree/master/test/examples/query for the xml and xsd
Related issues
Please register to edit this issue