Skip to content

Instantly share code, notes, and snippets.

Embed
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: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