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
<xsl:template match="a[contains(@href, '.php')]"> | |
<a href="{replace(@href, '.php', '')}"> | |
<xsl:value-of select="node()" /> | |
</a> | |
</xsl:template> |
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
<!-- Create a variable with the data that you want from $taggedItems --> | |
<xsl:variable name="myvariable"> | |
<xsl:for-each select="$taggedItems"> | |
<xsl:sort select="last-pub-date" order="descending"/> | |
<item> | |
<url><xsl:value-of select="..." /></url> | |
<title><xsl:value-of select="..." /><title> | |
<description>...</description> | |
</item> | |
</xsl:for-each> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<?pcf-stylesheet path="date.xsl" title="Date Example" extension="htm"?> | |
<!DOCTYPE document SYSTEM "http://commons.omniupdate.com/dtd/standard.dtd"> | |
<document xmlns:ouc="http://omniupdate.com/XSL/Variables"> | |
<ouc:div label="content1" group="Everyone" button-class="oucEditButton" button-text="Col1 Content" break="break" button="hide"><ouc:editor csspath="/_resources/ou/editor/maincontent.css" cssmenu="/_resources/ou/editor/menu.txt" width="955" wysiwyg-class="maincontent"/></ouc:div> | |
<ouc:div label="artdate" group="Everyone" button-text="Edit Date"><ouc:multiedit type="date" format="iso" prompt="Date" alt="Date." maxlength="100"/>08/27/2016</ouc:div> |
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
<!-- Convert img to icon --> | |
<xsl:template match="img[starts-with(@class, 'material-icons')]"> | |
<i class="{@class}"><xsl:value-of select="@alt" /></i> | |
</xsl:template> | |
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 to display and format an Individual Tag --> | |
<xsl:template name="DisplayTag"> | |
<xsl:param name="tag" /> | |
<!-- Remove the `library-database-` from the tag name --> | |
<xsl:variable name="tag-name" select="replace($tag/name, 'library-database-', '')" /> | |
<!-- Link the label to the page. This server uses aspx --> | |
<a href="{$tag-name}.aspx"> | |
<span class="label label-success"> |
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 Tags that are associated with the data file --> | |
<xsl:template name="GetTagsForPage"> | |
<xsl:param name="page-path" /> | |
<xsl:variable name="page-tags" select="doc(concat('ou:/Tag/GetTags?site=', $ou:site, '&path=', $page-path))/tags" /> | |
<xsl:for-each select="$page-tags/tag"> | |
<xsl:call-template name="DisplayTag"> | |
<xsl:with-param name="tag" select="." /> | |
</xsl:call-template> |
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
<!-- Display Journal content --> | |
<h3><xsl:value-of select="$page-content/document/ouc:properties/parameter[@name='database-name']" /></h3> | |
<p><xsl:value-of select="$page-content/document/ouc:properties/parameter[@name='database-description']" /></p> | |
<p><a href="{$page-content/ouc:properties[@label='config']/parameter[@name='database-url']}">Open Database</a></p> | |
<!-- GetTagsForPage function will get the tags associated with the data file --> | |
<xsl:call-template name="GetTagsForPage"> | |
<xsl:with-param name="page-path" select="concat($data-folder,'/', $file-name)" /> | |
</xsl:call-template> |
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] != ''"> |
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
<!-- Loop through list using the sibiling --> | |
<xsl:for-each select="$sortedcopy/file"> | |
<!-- Variables for single data file --> | |
<xsl:variable name="file-name"><xsl:value-of select="."/></xsl:variable> | |
<xsl:variable name="page-content" select="doc(concat($data-location,'/', $file-name))" /> | |
<!-- Check to make sure it is a data file --> | |
<xsl:if test="$page-content/document/page/@type = 'library-database'"> <!--library-database --> |
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
<!-- static folder to look for data files: --> | |
<xsl:variable name="data-folder" select="'/pcf/data'" /> | |
<xsl:variable name="data-location" select="concat($ou:root, $ou:site, $data-folder)" /> | |
<!-- Create Sorted Version First, this has to happen here so we can use preceding-sibling later --> | |
<xsl:variable name="sortedcopy"> | |
<xsl:for-each select="doc($data-location)/list/file"> | |
<xsl:sort select="." order="ascending"/> | |
<xsl:copy-of select="."/> |