diff --git a/src/modules/xforms/xforms.py b/src/modules/xforms/xforms.py index efa9b68..cb0f419 100644 --- a/src/modules/xforms/xforms.py +++ b/src/modules/xforms/xforms.py @@ -1109,6 +1109,11 @@ class Model(WidgetElement): logs.debug('Missing schema file "%s".' % schemaLocation) continue schema = schemaHolder.getRootElement() + if environs.getVar("debug"): + if schema.validateElement(context.specimen.node): + logs.debug("%s is valid against %s." % (context.specimen, schema)) + else: + logs.warning("%s is NOT valid against %s." % (context.specimen, schema)) if modelContext.schemas is None: modelContext.schemas = xmlschemas.SchemasContext( modelContext.specimen, previous = modelContext, uriPathFragment = "schemas")