Bug #2672
closedvalidating with validateToNode
100%
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
Updated by O'Neil Delpratt over 8 years ago
- Category set to C++ API
- Status changed from New to In Progress
- Assignee set to O'Neil Delpratt
Thank you for reporting this error. We will be investigating it and will report back shortly.
Updated by O'Neil Delpratt over 8 years ago
I have reproduced the error you reported and it is indeed a bug in the validateToNode method. I will be working on this and will commit a patch shortly.
Updated by O'Neil Delpratt over 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Found in version set to 1.0.0
Bug fixed and committed to subversion. The problem was in the validateToNode() method of the SchemaValidatorForCpp class of the Java code. The method argument does not match what is in the C++ code, which has the correct arguments.
A workaround would be to change the arguments in the C++ interface to match what is on the Java side for this method until a maintenance release is out.
Updated by O'Neil Delpratt over 8 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 1.0.1
Bug fix applied in the Saxon/C 1.0.1 maintenance release.
Please register to edit this issue