Output logic with exsl:document, plus some todo notes.