Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

XML everywhere

Name: Anonymous 2017-07-01 18:13

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" />

<xsl:template match="/">
<xsl:call-template name="FizzBuzz">
<xsl:with-param name="i" select="1" />
</xsl:call-template>
</xsl:template>

<xsl:template name="FizzBuzz">
<xsl:param name="i" />
<xsl:choose>
<xsl:when test="($i mod 3) = 0 and ($i mod 5) = 0">FizzBuzz&#xa;</xsl:when>
<xsl:when test="$i mod 3 = 0">Fizz&#xa;</xsl:when>
<xsl:when test="$i mod 5 = 0">Buzz&#xa;</xsl:when>
<xsl:otherwise><xsl:value-of select="$i" /><xsl:text>&#xa;</xsl:text></xsl:otherwise>
</xsl:choose>
<xsl:if test="$i &lt; 100">
<xsl:call-template name="FizzBuzz">
<xsl:with-param name="i" select="$i + 1" />
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

Name: Anonymous 2017-07-01 18:45


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List