I had a look at the question but however it does not quite answer my problem.
I am trying to write a grammar to parse XML using Spirit Qi and I for every line I want to append the filename as well as the line number in that file. So if there are entity references and they are replaced by the new file in the original file, I still want to know from where they came. In order to do that I needed to know how can one maintain the position as well as the file name while parsing.
I don't want to use the Spirit classic else this could be a good solution. But I need a way to do the same without using Spirit classic and want to use only Qi if possible.
Any suggestions?