Element 'ram:TypeCode' must occur exactly 1 times.
ram:TypeCode is missing from ram:AdditionalReferencedDocument or occurs more than once.
Each ram:AdditionalReferencedDocument at this location must contain exactly one document type code.
The document type code for a referenced document on an invoice line is missing or appears more than once. You can adjust the XML so that exactly one ram:TypeCode is present.
- Check
ram:AdditionalReferencedDocumentin the invoice line agreement. - Ensure that it contains exactly one
ram:TypeCode. - Regenerate the invoice and check it again.
<ram:AdditionalReferencedDocument> <ram:IssuerAssignedID>REF-1</ram:IssuerAssignedID> </ram:AdditionalReferencedDocument>
<ram:AdditionalReferencedDocument> <ram:TypeCode>Code</ram:TypeCode> </ram:AdditionalReferencedDocument>
Technical details
The Schematron check counts the direct ram:TypeCode elements within ram:AdditionalReferencedDocument and requires exactly one.
The rule applies to ram:AdditionalReferencedDocument in the agreement for an invoice line.
rule/@context)assert/@test)