Last active
December 31, 2015 11:49
-
-
Save vakiliy/6eaf2f468aea1f366db5 to your computer and use it in GitHub Desktop.
xml+xslt unique values Year
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:if test="count(.//year) != 0"> | |
<div> | |
<xsl:for-each select=".//year[generate-id() = generate-id(key('years',.)[1])]"> | |
<xsl:if test="./text() = /.//selected_year "> | |
<xsl:attribute name="class">current</xsl:attribute> | |
</xsl:if> | |
<xsl:if test="position() = 1"></xsl:if><xsl:value-of select="." /> г. | |
</xsl:for-each> | |
</div> | |
</xsl:if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment