Created
April 14, 2016 16:35
-
-
Save jessgusclark/64306ba5014b5ba5577f89d01bbfffb5 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
<!-- Template that takes a URL and formats the content: --> | |
<xsl:template name="GetContentFromSingleDataFile"> | |
<xsl:param name="data-url" /> | |
<!-- Get the full path to the data file: --> | |
<xsl:variable name="full-path" select="concat($ou:root, $ou:site, $data-url)" /> | |
<!-- Get Data File Content --> | |
<xsl:variable name="page-content" select="doc($full-path)/document" /> | |
<!-- Check to see if it is a data file since the subject page also has this tag associated with it --> | |
<xsl:if test="$page-content/page/@type = 'library-database'"> | |
<!-- Check to see if the data file is set to 'active' --> | |
<xsl:if test="$page-content/ouc:properties[@label='config']/parameter[@name='active']/option[@selected='true'] = 'True'"> | |
<!-- Display the Journal's Information: --> | |
<h2><xsl:value-of select="$page-content/ouc:properties[@label='config']/parameter[@name='database-name']" /></h2> | |
<p><xsl:value-of select="$page-content/ouc:properties[@label='config']/parameter[@name='database-description']" /></p> | |
<a href="{$page-content/ouc:properties[@label='config']/parameter[@name='database-url']}">Open Database</a> | |
<hr/> | |
</xsl:if> | |
</xsl:if> | |
</xsl:template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment