Subject: Re: [xsl] FizzBuzz in XSLT 1.0. Help with a 2.0/FXSL solution? From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 14 Mar 2007 17:51:14 GMT |
<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>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] FizzBuzz in XSLT 1.0. Help w, M. David Peterson | Thread | Re: [xsl] FizzBuzz in XSLT 1.0. He, David Carlisle |
[xsl] FizzBuzz in XSLT 1.0. Help w, M. David Peterson | Date | Re: [xsl] FizzBuzz in XSLT 1.0. He, David Carlisle |
Month |