Project

Profile

Help

Bug #2673

closed

returning validation with getValidationReport

Added by Roger Martin almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
C++ API
Start date:
2016-03-12
Due date:
% Done:

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
1.0.0
Fixed in version:
1.0.1
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

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

Related to SaxonC - Bug #2675: Validation report properties missing from documentationClosedO'Neil Delpratt2016-03-14

Actions

Please register to edit this issue

Also available in: Atom PDF