Since FileName is a child, not an attribute, you need to access it as such, and not use the @ attribute attribute before the node name.
Try:
<xsl:template match="DocumentElement/QueryResults[FileName]">
This will result in the selection of DocumentElement/QueryResults elements that have a child FileName element.
If, however, you always have a child of FileName (sometimes empty) and you want to select non-empty ones, try the following:
<xsl:template match="DocumentElement/QueryResults[string-length(FileName) > 0]">
Odded
source share