Skip to main content

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​

SchematronsThe rules of each Schematron pack the validator runs — shipped with NomaUBL or named by a document template.CIUS-FR — 312 rules ▾CIUS-FR.xsl · version 1.4.0.04RULESEVERITYDESCRIPTIONCONTEXTBR-FR-01fatalThe invoice number must not exceed 35 characterscbc:IDBR-FR-05fatalThe mandatory legal notes must be presentubl:InvoiceBR-FR-12fatalThe buyer SIREN must be presentcac:AccountingCustomerPartyBR-FR-CTC-03warningThe billing framework should be statedcbc:ProfileIDBR-FR-12fatalMUST BE TRUEexists(cac:Party/cac:PartyLegalEntity/cbc:CompanyID)MESSAGE[BR-FR-12] The buyer SIREN must be presentChoose a Schematronshipped · customer packsOne row per ruleassert or reportGrid toolssearch, filters, columns, exportFile and version+ templates using a customer packSeverityfatal · error · warning · infoRow windowpattern, context, test, message

Choosing a pack​

The Choose a Schematron picker lists the packs in two groups, each with its number of rules:

GroupPacks
Shipped with NomaUBLEN 16931, CIUS-FR, Extended CTC FR, Chorus Pro, NomaUBL, E-reporting (flux 10). The upgrade refreshes them with the release.
Customer packsEach 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.

ColumnContent
RuleIdentifier of the rule (BR-FR-12, BR-CO-15…), the one quoted in the validation errors.
Severityfatal, error, warning or info, as a coloured pill.
DescriptionWhat the rule requires, as written in the pack.
ContextThe 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.