Skip to content

Instantly share code, notes, and snippets.

@jdsimcoe
Created February 21, 2014 16:56
Show Gist options
  • Save jdsimcoe/9138238 to your computer and use it in GitHub Desktop.
Save jdsimcoe/9138238 to your computer and use it in GitHub Desktop.
HTML div class element
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="count(/data/locations-all/entry) = 4 and position() = 4">
<xsl:text>col-md-4 col-md-offset-4</xsl:text>
</xsl:when>
<xsl:when test="count(/data/locations-all/entry) = 5 and position() = 4">
<xsl:text>col-md-4 col-md-offset-2</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>col-md-4</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment