Today
<xsl:template match="@class[matches(.,'^java[x]?')]">
{'http...' || translate(.,',','/') || '.html' || @anchor}
</xsl:template>
but even back in 1.0 when you see lots of xsl:when it's XSLT syntax but not really XSLT but OP knows that.
I never subscribed to this purism. xsl:choose is syntax sugar for template matching. So is xsl:for-each, and xsl:call-template. Syntax sugar is a good thing.
But yes. I wish the JDK shipped with an updated XSL transformer.