Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<!-- begin template match for media object snippet -->
<xsl:template match="table[@class='snippet-media-object']" mode="copy">
<xsl:variable name="alignment">
<xsl:when test="lower-case(tbody/tr[3]/td[2]/node()) = 'bottom'">
<xsl:text> bottom</xsl:text>
<xsl:when test="lower-case(tbody/tr[3]/td[2]/node()) = 'middle'">
<xsl:text> middle</xsl:text>
<!-- this sets class name and by default it is not included so no class needed -->
<div class="media-object stack-for-small">
<div class="media-object-section{$alignment}">
<xsl:apply-templates select="tbody/tr[5]/td[1]/node()" mode="copy"/>
<div class="media-object-section main-section">
<xsl:apply-templates select="tbody/tr[5]/td[2]/node()" mode="copy"/>
<!-- 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