ocrd_validators.xsd_validator module

Validating XML Schema

class ocrd_validators.xsd_validator.XsdValidator(schema_url)[source]

Bases: object

XML Schema validator.

classmethod instance(schema_url)[source]
classmethod validate(schema_url, doc)[source]

Validate an XML document against a schema.

Parameters
  • doc (etree.ElementTree|str|bytes) –

  • schema_url (str) – URI of XML schema to validate against.