simplify XSL transform logic