Created
March 27, 2017 19:25
-
-
Save ctbarber/47e86b18b93aec97829323dbf339c92f to your computer and use it in GitHub Desktop.
This file contains 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
<!-- begin template match for media object snippet --> | |
<xsl:template match="table[@class='snippet-media-object']" mode="copy"> | |
<xsl:variable name="alignment"> | |
<xsl:choose> | |
<xsl:when test="lower-case(tbody/tr[3]/td[2]/node()) = 'bottom'"> | |
<xsl:text> bottom</xsl:text> | |
</xsl:when> | |
<xsl:when test="lower-case(tbody/tr[3]/td[2]/node()) = 'middle'"> | |
<xsl:text> middle</xsl:text> | |
</xsl:when> | |
<xsl:otherwise> | |
<!-- this sets class name and by default it is not included so no class needed --> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> | |
<div class="media-object stack-for-small"> | |
<div class="media-object-section{$alignment}"> | |
<div> | |
<xsl:apply-templates select="tbody/tr[5]/td[1]/node()" mode="copy"/> | |
</div> | |
</div> | |
<div class="media-object-section main-section"> | |
<xsl:apply-templates select="tbody/tr[5]/td[2]/node()" mode="copy"/> | |
</div> | |
</div> | |
</xsl:template> | |
<!-- end template match for media object snippet --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment