Created
March 27, 2017 19:13
-
-
Save ctbarber/96351f903026d45cefe4fb8bcbaf602f 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 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