Attempting to use current entity but none exists.
#6049 Run-time catchable error
Attempting to use current entity but none exists.
Additional Information
Unqualified external entity accessed outside an 'X' rule.
where X is either EXTERNAL-TEXT-ENTITY or EXTERNAL-TEXT-ENTITY.
Explanation
This error is issued when a function accesses an unqualified entity,
notation, or data-attribute, but it turns out the function is not
called from an EXTERNAL-TEXT-ENTITY or EXTERNAL-TEXT-ENTITY rule.