I have these variables:
<xsl:variable name="dystrybutor1" select="count(//gra[dystrybutor='Atari'])"/> <xsl:variable name="dystrybutor2" select="count(//gra[dystrybutor='CD Projekt'])"/> <xsl:variable name="dystrybutor3" select="count(//gra[dystrybutor='Cenega'])"/> <xsl:variable name="dystrybutor4" select="count(//gra[dystrybutor='Double Fine'])"/> <xsl:variable name="dystrybutor5" select="count(//gra[dystrybutor='Electronic Arts'])"/> <xsl:variable name="dystrybutor6" select="count(//gra[dystrybutor='LEM'])"/> <xsl:variable name="dystrybutor7" select="count(//gra[dystrybutor='Rockstar Games'])"/> And these instructions:
<text x="85" y="{(($max)-(80*$dystrybutor1))+5}"><xsl:value-of select="$dystrybutor1"/></text> <text x="85" y="{(($max)-(80*$dystrybutor2))+5}"><xsl:value-of select="$dystrybutor2"/></text> <text x="85" y="{(($max)-(80*$dystrybutor3))+5}"><xsl:value-of select="$dystrybutor3"/></text> <text x="85" y="{(($max)-(80*$dystrybutor4))+5}"><xsl:value-of select="$dystrybutor4"/></text> <text x="85" y="{(($max)-(80*$dystrybutor5))+5}"><xsl:value-of select="$dystrybutor5"/></text> <text x="85" y="{(($max)-(80*$dystrybutor6))+5}"><xsl:value-of select="$dystrybutor6"/></text> <text x="85" y="{(($max)-(80*$dystrybutor7))+5}"><xsl:value-of select="$dystrybutor7"/></text> Is it possible to make for-each with incrementation of number in variable name? Something like:
<xsl:for-each select="1 to 7"><text x="85" y="{(($max)-(80*$dystrybutor{NUMBER}))+5}"><xsl:value-of select="$dystrybutor{NUMBER}"/>[some instruction to increment NUMBER]</text></xsl:for-each>
No comments:
Post a Comment