NFE-552
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 com CNPJ/CPF inválido [nOcor: …] (…, série …).
nfe:infNFe/nfe:ide/nfe:NFref/nfe:refNFe
br:keyissuer($k)
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol
Rejeição: Chave de Acesso referenciada com CNPJ inválido [nOcor: …] (CT-e, …).
nfe:infNFe/nfe:ide/nfe:NFref/nfe:refCTe
br:cnpj(substring($k, 7, 14))
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol