...
<foreach select="compilation-unit">
<choose>
<when test="@language='Java'">
<template save="{@name}.java" uri="java.xsl"/>
</when>
<when test="@language='C' or @language='C++'">
<template save="{@name}.c" uri="c.xsl"/>
</when>
<otherwise>
<template save="{@name}.txt" uri="other.xsl"/>
</otherwise>
</choose>
</foreach>
... |