Looking at the actual code which does the work is indeed another way to figure out what it is doing.
http://manual.calibre-ebook.com/deve...ml#code-layout
And take a look at:
src/calibre/ebooks/conversion/plumber.py
src/calibre/ebooks/oeb/transforms/*