Adobe added an extension based on XSL:FO very early on in order to allow headers and footers. It's very poorly documented (
one page of notes is all you get) and only implements a tiny subset of XSL:FO. Naturally, styling produced using this only works on ADE Reading Systems (though those represent the majority of portable devices). A large number of ebooks incorporate this file, though in almost every case it's simply a stock template that's been pasted in to allow two-column flows on wide devices. I suspect that very few who use it professionally actually understand how to make it do more than that.
I've attached an example which shows how to use it to create headers and footers
IF YOU ABSOLUTELY HAVE TO USE THEM. Don't ask me why the footer keeps bouncing around - I think this extension is little more than a legacy now. Note that you need to keep repeating the head and foot in your text - I couldn't find a way to get around that. The styling uses
Jellby's trick to stop them showing up on non-ADE readers.