Bug #2673
closed![Author: Roger Martin](https://www.gravatar.com/avatar/9106c03bc73a072f970e03f36f025f7b?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: O'Neil Delpratt](https://www.gravatar.com/avatar/a0bc1766b412d8fecb16f7d304916359?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
returning 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