Project

Profile

Help

Bug #2672

closed

validating with validateToNode

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

Status:
Closed
Priority:
Low
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

In testing SchemaValidator::validateToNode it says:

Error: libsaxon.validate not found

I put a test app together:

@#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;

}@

the books.xml and xsd are at https://github.com/rimmartin/saxon-node/tree/master/test/examples/query

Please register to edit this issue

Also available in: Atom PDF