4 ms·
Using your solution, one may shorten the XSL-T (with XSL-T 3.0) to: <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:
by zmix 6y ago
Using your solution, one may shorten the XSL-T (with XSL-T 3.0) to:
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="xsl:initial-template">
<xsl:sequence select='
for $i in 1 to 100
return (("Fizz"[$i mod 3 = 0] || "Buzz"[$i mod 5 = 0])[.], $i)[1]
' />
</xsl:template>
<xsl:stylesheet>
While I understand the ratio behind the article and agree, the author does not acknowledge, that XSL-T is not a "programming language" but a "templating language".