You may want to take a look at the "DDBDP-style" apparatus in the EpiDoc stylesheets, which does some of this for HTML title attributes on the HTML apparatus output, meaning you get the "human readable" apparatus as a mouseover on the apparatus entry when you hover over it (see http://sourceforge.net/p/epidoc/code/HEAD/tree/trunk/example-p5-xslt/tpl-apparatus.xsl
). If you take a look at http://papyri.info/ddbdp/bgu;1;5
(scroll down to the bottom for the apparatus), you'll see this in action. The XSLT itself is rather complex and it may well be possible to do it better, but it might give you some ideas in any case.