NFE-680
The rule sets below word this rule differently; each wording is shown with its rule set.
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.
Rejeição: Chave de Acesso referenciada em duplicidade na NF-e [nOcor: …].
nfe:infNFe/nfe:ide/nfe:NFref/nfe:refNFe
not(../preceding-sibling::nfe:NFref/nfe:refNFe = .)
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol
Rejeição: Chave de Acesso referenciada em duplicidade na NF-e [nOcor: …] (CT-e).
nfe:infNFe/nfe:ide/nfe:NFref/nfe:refCTe
not(../preceding-sibling::nfe:NFref/nfe:refCTe = .)
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol