split lang functions into model.xsl and templates into view.xsl