Invalid identifier scheme for the seller’s tax representative

Error FX-SCH-A-000766 Factur-X

Value of '@schemeID' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The value of the @schemeID attribute on ram:ID is not included in the applicable code list.

What the rule means

The attribute identifies the scheme used for the identifier. A value that is not allowed can affect the unambiguous interpretation of the organisation identifier.

Please use an allowed scheme for the tax representative’s organisation identifier

The @schemeID on the tax representative’s ram:ID is not allowed. You can correct the invoice by using a value included in the corresponding code list.

What to do
  1. Find ram:ID in ram:SpecifiedLegalOrganization of ram:SellerTaxRepresentativeTradeParty.
  2. Check the value of @schemeID against the corresponding code list.
  3. Generate the invoice again and validate it again.
Technical details

The test allows an empty extracted code value or checks whether it is present in the code list with identifier 12.

Where the rule applies

The rule applies to ram:ID within ram:SpecifiedLegalOrganization of ram:SellerTaxRepresentativeTradeParty.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedLegalOrganization/ram:ID
Test expression (assert/@test)
string-length($codeValue12)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=12]/enumeration[@value=$codeValue12]