NFE-1130
Rejeição: Um único documento fiscal deve ser referenciado (… chaves de acesso diferentes em DFeReferenciado).
In English The items reference different documents; only debit notes of type 03 and 07 and returns may.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
nfe:infNFe
$debit = ('03', '07') or $fin = '4' or count(distinct-values($itemRefs/nfe:chaveAcesso)) le 1
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol