From Michael Kay, the author of the excellent open source Saxon parser:
The XSLT 1.0 example that you cite uses the technique of including the text file as an external entity into an XML file that adds a wrapper element to make it into well-formed XML. Actually, that’s a highly dubious technique since it fails if the text file contains “<" or "&" characters.
In XSLT 2.0 you can do this much more directly by reading the text file using the unparsed-text() function as Jesper suggests. A couple of points about his example, though. The fact that he’s tokenizing using newline as a delimiter seems to have got lost somewhere – it looks like a space when displayed in the browser. I would suggest
tokenize(unparsed-text(‘abc.txt’), ‘\r?\n’)
And he suggests that you have to supply an XML document as a dummy input – that’s not true; you can run without a primary input by starting your stylesheet at a named template (use for example -it:main on the command line).