A modified version of xTemplate