Schematrons
The Schematrons page lists the rules of every Schematron pack the validator runs: the packs shipped with NomaUBL and the customer packs named by a document template. Each rule is a row — its identifier, severity, description and the element it applies to — and a row opens the test the rule evaluates and the message it returns. The page answers the question that follows a validation error: what exactly does this rule check?
Open it from Schematrons in the Documentation group, after Business Rules.
At a glance
Choosing a pack
The Choose a Schematron picker lists the packs in two groups, each with its number of rules:
| Group | Packs |
|---|---|
| Shipped with NomaUBL | EN 16931, CIUS-FR, Extended CTC FR, Chorus Pro, NomaUBL, E-reporting (flux 10). The upgrade refreshes them with the release. |
| Customer packs | Each precompiled stylesheet named in the Custom Schematron field of a document template. |
Next to the picker, the page shows the file name, the version and the date of the pack, and for a customer pack the templates that use it. The last pack consulted is reopened on the next visit.
Rules grid
One row per rule (assert or report) of the pack, sorted by identifier, 100 rows per page.
| Column | Content |
|---|---|
| Rule | Identifier of the rule (BR-FR-12, BR-CO-15…), the one quoted in the validation errors. |
| Severity | fatal, error, warning or info, as a coloured pill. |
| Description | What the rule requires, as written in the pack. |
| Context | The element the rule is evaluated on (XPath). |
| Pattern, Kind, Test (hidden) | Group of rules, assert or report, and the XPath test. Shown from the column menu. |
The grid has the usual search, filters (severity, pattern), column choice and export.
Rule window
A click on a row opens the rule: description, Pattern, Context, then the test under Must be true for an assert or Fires when for a report, and the Message written into the validation error.
Access
The page follows the Business Rules grant of the Documentation group on the Roles page: a role that reads the business rules reads the Schematrons too.
Tips & best practices
- Start from the error. Copy the rule identifier from the invoice's validation errors and type it into the search box of the grid.
- Read the test, not only the message. The message is short; the Must be true expression says exactly which element and which value the rule expects.
- Check a customer pack after an edit. The picker shows its rule count and the templates that use it; a pack that cannot be read shows its error under the picker.
- Keep customer rules in customer packs. The shipped packs are replaced at each upgrade; see Rule sets for choosing which standard packs run.