Skip to content

Problem: Tree or serialize() required as an arg to validate functions when METSDocument would be a nicer abstraction #41

@ross-spencer

Description

@ross-spencer

Here, and a few other places we're asked to pass a .tree argument as mets_doc, in this case, to validate the document:

def xsd_validate(mets_doc, xmlschema=METS_XSD_PATH):
    xmlschema = get_xmlschema(xmlschema, mets_doc)
    is_valid = xmlschema.validate(mets_doc)
    error_log = xmlschema.error_log
    return is_valid, error_log

I wonder if the METSDocument itself wouldn't be a nicer abstraction to be passing around functions such as this when using this utility?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions