Skip to content

schemaLocation remapping when validating against a schema directory #60

@bworrell

Description

@bworrell

When validating a document using --schema-dir or the schemas parameter, the underlying libxml2 schema parsing engine still attempts to resolve remote xs:import and xs:include schemas. This can hang the validator when the system is offline.

We should look into remapping xs:include and xs:import statements to localized schemas found within the input schema directory. This would require a pre-parse of the schemas and the creation of a localized, tmp set of modified schemas to validate against.

This gets tricky when you factor in xs:include, because multiple schemas define the same targetNamespace.

This may also be something we just don't want to do, as we'd technically be validating against a modification of the input schemas and not the input schemas themselves. This could potentially result in undesired behaviors and false positives/negatives. We need to consider if this is okay or not.

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