TIBCOSoftware / genxdm

GenXDM: XQuery/XPath Data Model API, bridges, and processors for tree-model neutral access to XML.
http://www.genxdm.org/
9 stars 4 forks source link

Validator throws NPE when validating complexType with simple content with caller-specified initial type #164

Closed jbaysdon closed 9 years ago

jbaysdon commented 9 years ago

When validating a complexType with simple content via the TypedContext.validate(ContentGenerator, ValidationHandler, QName) method with a non-null QName for the initialType, the validator will throw an NPE in the ValidationKernel.checkValueConstraintForElement method at line 110.

jbaysdon commented 9 years ago

Checked in fix for ValidationKernel.text(List) method wherein we don't call checkValueConstraintForElement when the element declaration is null. That can happen when the user specifies the initial type for validation and the element declaration, itself, is unknown or not calculated.