Use an allowed value for schemeID

Error FX-SCH-A-000552 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 non-empty schemeID value for ram:GlobalID is not included in the code list used by this rule. The test also permits an empty value.

What the rule means

A non-empty schemeID value must match an entry in the designated code list so that the identification scheme can be classified unambiguously.

Please use an allowed scheme value for the product identifier

The value provided for schemeID is not included in the designated list. This rule allows an empty value or a value listed there.

What to do
  1. Check the value of schemeID on ram:GlobalID.
  2. Use either an empty value or a value from the code list designated for this rule.
  3. Generate the invoice again and validate it once more.
Good to know

The test explicitly allows either an empty value or an entry from the code list identified by 5.

Technical details

The test accepts either an empty value or a value present in the code list identified by 5.

Where the rule applies

The rule applies to the value of the schemeID attribute on ram:GlobalID in SpecifiedTradeProduct for an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct/ram:GlobalID
Test expression (assert/@test)
string-length($codeValue5)=0 or document('FACTUR-X_BASIC_codedb.xml')/codedb/cl[@id=5]/enumeration[@value=$codeValue5]