switched to xsl document function