pyxsd.batch =========== .. py:module:: pyxsd.batch .. autoapi-nested-parse:: Sequential parsing of explicitly identified local XML files. Records are frozen, but a contained Document remains mutable. Exceptions ---------- .. autoapisummary:: pyxsd.batch.BatchParseError Classes ------- .. autoapisummary:: pyxsd.batch.DocumentSource pyxsd.batch.InputFailure pyxsd.batch.ParseOutcome Functions --------- .. autoapisummary:: pyxsd.batch.iter_parse Module Contents --------------- .. py:class:: DocumentSource Caller label and local path, anchored when constructed. .. py:attribute:: id :type: str .. py:attribute:: path :type: str | os.PathLike[str] .. py:class:: InputFailure Expected input failure, without a live exception or traceback. .. py:attribute:: kind :type: Literal['io', 'malformed_xml'] .. py:attribute:: message :type: str .. py:class:: ParseOutcome One input's result with a snapshot of its validation issues. .. py:attribute:: source :type: DocumentSource .. py:attribute:: status :type: Literal['valid', 'invalid', 'input_error'] .. py:attribute:: document :type: pyxsd.document.Document | None .. py:attribute:: issues :type: tuple[pyxsd.validation.ValidationIssue, ...] .. py:attribute:: error :type: InputFailure | None .. py:exception:: BatchParseError(outcome) First failed input in raise mode; inspect :attr:`outcome`. .. py:attribute:: outcome .. py:function:: iter_parse(schema, sources, *, errors = 'raise') Parse in caller order, lazily, without retaining earlier outcomes. Configuration and schema checks run on first iteration. Expected input failures stop with BatchParseError by default; report mode yields them. Do not parse concurrently or reentrantly on this Schema.