Disallowed identification scheme code

Error FX-SCH-A-001120 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 provided for schemeID is not in the code list defined for this identification scheme. This check also accepts an empty value.

What the rule means

schemeID identifies the scheme used to interpret the identifier of ram:SpecifiedLegalOrganization. A disallowed code may prevent the identifier from being classified unambiguously.

Please use an allowed code for the organization identifier’s `schemeID`

The schemeID for the ultimate ship-to party’s organization identifier contains a code that is not allowed for this identification scheme. You can update the value or leave it empty.

What to do
  1. Check the schemeID attribute on ram:ID within ram:SpecifiedLegalOrganization.
  2. Use a code allowed by the associated code list, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts either an empty $codeValue12 or a value present in the code list with ID 12.

Where the rule applies

The rule applies to the schemeID attribute of ram:ID within ram:SpecifiedLegalOrganization of the ultimate ship-to party for an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeDelivery/ram:UltimateShipToTradeParty/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]