Skip to main content

Validation in Atlas

XSD, Schematron, and validation rule checks, their effect on transformation runs, and where to find the results

The Schema validation report for a failed transform, listing one Schematron error and one warning, with the XSD check passed

Atlas validates source documents before transformation and output documents after transformation. Formats can include an XSD for structural validation and a Schematron file for business rules, such as checking that the invoice total equals the total without VAT plus the VAT amount.

A document can pass XSD validation and fail Schematron validation. Formats can also have validation rules that you review on a project's Rules stage.


How It Works

When the checks run

A transform in a project runs the checks in this order:

  1. Atlas checks the source document against the source format's XSD and Schematron. A failure stops the run with Source document failed XSD or Schematron validation.

  2. Atlas transforms the document.

  3. Atlas checks the output against the target format's XSD and Schematron. A failure stops the run with Generated target document failed XSD or Schematron validation.

  4. The target format's approved validation rules run on the output. A failed ERROR rule marks the run as an error with Validation failed: {n} ERROR rules did not pass, followed by up to three rule ids.

A check runs only when the format has that file attached, and a format with neither file gets no XSD or Schematron check. You attach them in Import format when you import the format, or later under Schema files on the format page. Bypass validations on the Transform stage skips all three kinds of check for one run and marks the output unvalidated.

Validation rules run only on transforms inside a project. Output rendered for the Docupath platform is checked only against the target format's XSD and Schematron.

What stops a run and what only warns

Check

Fails the run

Only reported

XSD, on the source and the output

Any violation, since every XSD violation is an error

A warning when the XSD could not be loaded

Schematron, on the source and the output

Any error

Warnings

Validation rules of the target format

A failed ERROR rule

Failed WARNING and INFO rules

An XSD that Atlas cannot load, for example one that imports other schema files Atlas does not have, is skipped with a warning. The Schematron check still runs, and the report shows the XSD as Skipped.

Validation rules

The Atlas Validation rules page of a sample project with the source format selected, listing rules with their status, severity, category, target path and description

Validation rules are checks stored on a format, not on a project. You review them on a project's Rules stage, which opens the Validation rules page. The Format toggle switches between Source: {name} and Target: {name}, and the page opens on the source format.

Status

Tooltip

Runs in a transform

Proposed

Awaiting review

No

Approved

Reviewed and confirmed

Yes, when the rule belongs to the target format

Modified

Edited after proposal

No. Editing a rule sets this status, and it runs again once you approve it

Rejected

Marked as incorrect

No

Generate rules asks AI to propose rules for the format shown, and they arrive Proposed. Once the format has rules the button reads Regenerate rules, which adds a new set of proposed rules and keeps the existing ones. The button is hidden when the format has an XSD or a Schematron, and the page says so, for example This format uses an XSD and a Schematron validation, so generated rules are unavailable. A format with a Schematron lists its assertions, read only, under Schema assertions ({n}).

Where results show

On a project's Transform stage:

  • Schema opens the Schema validation dialog: Valid or Invalid, one tile each for XSD · STRUCTURAL and SCHEMATRON · BUSINESS RULES (Passed, a count of findings, Skipped or Not run), and a card per finding with its id, ERROR or WARNING, the message and the location. It shows the output's report, or the source report when the run stopped at the source. A preview's schema badge and report cover the source document.

  • The Rules cell shows passed rules out of the total and opens the Validation rules report: All rules pass or how many are failing, the tiles SCORE, PASSED, FAILED and WARNINGS, and each failing rule with the value found. A dash means no approved rules ran for that file.

  • Validate only checks files against the source format's XSD and Schematron without transforming them. Validation rules do not run.

In the Docupath platform, Atlas checks the output of a document type that uses an Atlas format each time it renders it. A failure blocks Approve, Reject and Validate, and the findings show on the document's Destination tab.


Supported Configurations and Options

Severities and categories

Severity

Tooltip

ERROR

Blocks output when the check fails

WARNING

Flags an issue without blocking output

INFO

Adds context without requiring action

Category

Tooltip

REQUIRED

Field must be present

FORMAT

Value must match the required format

RANGE

Value must be within the allowed range

CROSS_FIELD

Related fields must agree

CONDITIONAL

Runs only when its condition matches

CUSTOM

Project-specific check

Each rule also has a Target Path, the field it checks, and a Description. Edit opens Edit Rule: {id} with Severity, Description, Generate Expression (writes the expression from the description) and Expression (JavaScript).

Actions on the Rules page

Action

What it does

Approve all / Reject all

Approve or reject the Proposed rules of the format shown. Unlike Approve all on the Field mappings page, they leave rules in other statuses as they are

Row checkboxes

Approve {n} selected, Reject {n} selected or Clear

Required only

Shows ERROR rules and REQUIRED rules (Show rules that can block output). A REQUIRED rule with WARNING severity is listed but does not block

Delete

Removes the rule permanently


Other Technical Specifications

  • A rule's expression is one check on value: presence (value != null, or another presence form such as !!value or value !== null && value !== undefined && value !== ""), a comparison with a number (value > 0), equality with a quoted string (value === "INV"), length (value.length <= 35), value.includes("x"), value.startsWith("INV-"), value.endsWith("x"), or one regular expression (/^[A-Z]{2}\d+$/.test(value)). Checks cannot be combined; write two rules for the same path instead. Atlas does not save any other expression. A rule with no expression checks that the value is present.

  • In a Schematron, a failed assert is an error and a triggered report is a warning. An assert or report whose role or flag says warning, warn, info or information counts as a warning, and error or fatal as an error.

  • XML is validated up to 10 MB and a nesting depth of 200. Input may not contain a DOCTYPE or ENTITY declaration.


Notes

  • A format's approved rules apply in every project that uses it as the target, so approving one changes the checks everywhere.

  • The Rules page opens on the source format, whose rules never run. Switch to Target to see the rules that do.

  • A file added or replaced under Schema files is saved to the format's draft version and applies once that version is active.

Did this answer your question?