Use an allowed document type code

Error FX-SCH-A-000635 Factur-X

Value of 'ram:TypeCode' 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 ram:TypeCode is not empty and does not occur in the code list checked for this element. This specific check also accepts an empty value.

What the rule means

ram:TypeCode identifies the type of the exchanged document. Under this rule, a value outside the associated code list is not recognized as an allowed document type code.

Please use an allowed document type code

The value in ram:TypeCode is not included in the code list checked for this field. You can compare the code with the allowed entries and adjust it.

What to do
  1. Locate ram:TypeCode in the document header.
  2. Check whether its value is included in the code list applicable to this element.
  3. Generate the invoice again and validate it once more.
Technical details

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

Where the rule applies

The rule applies to ram:TypeCode of the exchanged document in the document header.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode
Test expression (assert/@test)
string-length($codeValue2)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=2]/enumeration[@value=$codeValue2]