BR-FR-32-ID

Tout identifiant d'une Partie avec schemeID = '0002' DOIT être composé de 9 chiffres.

In English A party identifier with the scheme 0002 must be 9 digits.

error: the document is invalid

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element

Message

[BR-FR-32/ID] Tout identifiant d'une Partie avec schemeID = '0002' DOIT être composé de 9 chiffres.

Context
//cac:PartyIdentification/cbc:ID[@schemeID = '0002' or @schemeID = '0231']
Test
matches(normalize-space(.), '^\d{9}$')

Checked with France e-invoice (UBL), France e-credit note (UBL), France EXTENDED-CTC-FR (UBL)