Project

Profile

Help

Bug #3952

closed

SchemaValidator 'lax' option causes crash

Added by O'Neil Delpratt about 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
High
Category:
-
Start date:
2018-10-05
Due date:
% Done:

100%

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

Description

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.


Files

SchemaValidator.h (5.98 KB) SchemaValidator.h Contains workaround fix O'Neil Delpratt, 2018-10-05 19:06
SchemaValidator.cpp (17.8 KB) SchemaValidator.cpp Contains workaround fix O'Neil Delpratt, 2018-10-05 19:06

Please register to edit this issue

Also available in: Atom PDF