File: Data.xml
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
select="if ($schema-version lt 3.0)
then 'code'
else 'reason-code'" />
Output: