Consolidate into doc.xslt and add 'class' template.