[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: FizzBuzz in XSLT 1.0. Help with a 2.0/FXSL soluti
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:output method="text"/> <xsl:template match="fizzbuzz"> <xsl:variable name="m" select="test/mod"/> <xsl:for-each select="xs:integer(substring-before(range,'-')) to xs:integer(substring-after(range,'-'))"> <xsl:text> </xsl:text> <xsl:variable name="r" select="$m[(current() mod @value) = @test]"/> <xsl:value-of separator="" select="if($r) then $r else ."/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|