Last active
April 18, 2016 19:12
-
-
Save jessgusclark/c39d593c77aaaa60deccc2862ce3e47e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!-- Get the first character of the title (example: If 'accounting' this will return 'A') --> | |
<xsl:variable name="current-letter" select="upper-case( | |
substring( | |
$page-content/document/ouc:properties/parameter[@name='database-name'],1,1 | |
) | |
)"/> | |
<!-- If previous data file exists, get it, else leave the variable $previous-letter as blank --> | |
<xsl:variable name="previous-letter"> | |
<xsl:if test="preceding-sibling::file[1] != ''"> | |
<xsl:value-of select="upper-case( | |
substring( | |
doc(concat($data-location,'/', preceding-sibling::file[1]))/document/ouc:properties/parameter[@name='database-name'],1,1 | |
) | |
)" /> | |
</xsl:if> | |
</xsl:variable> | |
<!-- If the first character of the previous title does not equal the first character of the current title, display a header --> | |
<xsl:if test="$previous-letter != $current-letter"> | |
<h2 class="break-above"><xsl:value-of select="$current-letter" /></h2> | |
</xsl:if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment