Skip to content

Instantly share code, notes, and snippets.

@jdsimcoe
Created July 19, 2012 16:27
Show Gist options
  • Save jdsimcoe/3145103 to your computer and use it in GitHub Desktop.
Save jdsimcoe/3145103 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="entries" />
<xsl:template name="alerts">
<xsl:if test="//status-all-entries/entry[name = 'ustream-status']/content = 'live'">
<div class="alert alert-success alertLive hidden">
<a class="close" data-dismiss="alert">×</a>
<strong>We're broadcasting live right now!</strong>
<a class="btn btn-success modalLiveLink">
<xsl:text> Watch the broadcast »</xsl:text>
</a>
</div>
</xsl:if>
<xsl:if test="count($entries)">
<div class="alert">
<xsl:for-each select="$entries">
<xsl:if test="content">
<a class="close" data-dismiss="alert">×</a>
</xsl:if>
<xsl:value-of select="normalize-space(content)" />
</xsl:for-each>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment