I spent a good part of today figuring out how to make a site using the built-in templating system offered by eXist.
The best example to use is the Shakespeare app. It is surprisingly fast, given that it uses no XSLT whatsoever to transform the xml sources. Instead, there is a large number of case statements that check for specific elements and then provide a transform, like this:
case element(tei:lg) return
<div xmlns="http://www.w3.org/1999/xhtml" class="lg" id="{tei2:get-id($node)}">{tei2:tei2html($node/node()) }</div>
Another thing the demo does is use about a zillion little functions chained together to get things done, presumably for re-use, but I found it difficult to keep everything straight after a while.
I can see the value of abstracting the processing and keeping the html tidy, but I think I'm happier straddling the line. Using a combination of XQuery and XSLT for large-document collections makes a whole lot more sense to me.