SchemaValidator 'lax' option causes crash
When we use the 'lax' option on SchemaValidator it causes a crash. for example. validator.setProperty("lax", "true");
Internal error reported when debug is switched on:
Exception in thread "main" java.lang.ClassCastException: java.lang.String at net.sf.saxon.option.cpp.SchemaValidatorForCpp.applySchemaProperties(Unknown Source) at net.sf.saxon.option.cpp.SchemaValidatorForCpp.validate(Unknown Source)
The cause is in the SchemaValidatorForCpp Java class does not first convert the string to boolean.
#1 Updated by O'Neil Delpratt 10 months ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Bug fixed. Made change in the Java class SchemaValidatorForCpp.
- Set lax option in a config file. But there seems to be an issue with using a config file and SchemaValidation. see bug issue: #3953
- Modify the SchemaValidator.cpp file to pass the expected value for the 'lax' option i.e. Boolean object.
#2 Updated by O'Neil Delpratt 10 months ago
I have modified the SchemaValidator class with the option 2 workaround from comment #1
Notice we now have a method called
setLax(boolean) used to set the lax option.
Please register to edit this issue