mutter/doc/common/cookbook.xsl
Elliot Smith 1d9c64ff16 cookbook: Added support for inline video
Amended Makefile to copy content of videos directory into
installation directories. Also copies videos and images
into the html/ directory during the build, so that the
built cookbook can be viewed locally (for testing without
having to install).

Added an XSLT template to transform Docbook <inlinemediaobject>
elements into HTML 5 <video> elements, with a fallback to
link to the video displayed for browsers without HTML 5 support.

Added note to "Contributing" appendix explaining how to put
video into a recipe.
2010-07-15 17:31:10 +01:00

19 lines
644 B
XML

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:include href="ref-html-style.xsl"/>
<xsl:template match="inlinemediaobject" priority="100">
<video controls="controls">
<xsl:attribute name="src"><xsl:value-of select="videoobject/videodata/@fileref"/></xsl:attribute>
<!-- fallback link to video for non-HTML 5 browsers -->
<a>
<xsl:attribute name="href">
<xsl:value-of select="videoobject/videodata/@fileref"/>
</xsl:attribute>
<xsl:apply-templates select="alt"/>
</a>
</video>
</xsl:template>
</xsl:stylesheet>