Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!-- begin template match for video snippet -->
<xsl:template match="table[@class='snippet-flex-video']" mode="copy">
<xsl:variable name="widescreen">
<xsl:choose>
<xsl:when test="lower-case(tbody/tr[2]/td[2]/node()) = 'yes'">
<xsl:text> widescreen</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>
<xsl:variable name="vimeo">
<xsl:choose>
<xsl:when test="lower-case(tbody/tr[3]/td[2]/node()) = 'yes'">
<xsl:text> vimeo</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="flex-video{$widescreen}{$vimeo}">
<xsl:apply-templates select="tbody/tr[4]/td[2]/node()" mode="copy"/>
</div>
</xsl:template>
<!-- end template match for video snippet -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment