I am trying to parse the latest DataCite xml schema version 4.4 (source files here). I found the xmlschema package for python which appears to be exactly what I want but I've been trying for 3 days now to get it to parse properly and can't seem to get it working.
When trying to parse with validation either "strict" or "lax":
from xmlschema import XMLSchema
schema = XMLSchema("metadata.xsd", validation="strict")
I encounter the following error which occurs for all types declared under the datacite namespace:
xmlschema.exceptions.XMLSchemaKeyError: "global xs:simpleType/xs:complexType '{http://datacite.org/schema/kernel-4}nameIdentifier' not found"
I've tried to follow along with what is happening using a debugger but I haven't been able to work out what is going wrong and why none of the declared types are being discovered. Any help is much appreciated!