#file-name

built-in shelf

Purpose

#file-name is a built-in stream shelf that provides the name of the file in which the current markup error was found. This will be either the name of the main input file or the name of the file from which the text of an external entity was being read. This stream shelf can be accessed only from the header and body of markup-error rules.

The is attached test is always true for #file-name.