BR-FR-32-LEGALID
The rule sets below word this rule differently; each wording is shown with its rule set.
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.
[BR-FR-32/LEGALID] Tout identifiant légal d'une Partie avec schemeID = '0002' DOIT être composé de 9 chiffres.
//cac:PartyLegalEntity/cbc:CompanyID[@schemeID = '0002']
matches(normalize-space(.), '^\d{9}$')
Checked with France e-invoice (UBL), France e-credit note (UBL), France EXTENDED-CTC-FR (UBL)
BR-FR-32/LEGALID : Tout identifiant légal d'une Partie avec schemeID = '0002' DOIT être composé de 9 chiffres.
//ram:SpecifiedLegalOrganization/ram:ID[@schemeID = '0002']
matches(normalize-space(.), '^\d{9}$')
Checked with France e-invoice (CII), France Factur-X EN 16931, France EXTENDED-CTC-FR (CII), France Factur-X EXTENDED, France Factur-X BASIC WL