--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ version="1.0">
+
+ <xsl:output method="xml"/>
+ <xsl:strip-space elements="xhtml:a"/>
+
+ <xsl:include href="utilities.xsl"/>
+
+ <!-- =====================================================
+ Copying template.
+ ===================================================== -->
+ <xsl:template match="@*|node()" mode="copy">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="copy"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:element name="program-info">
+ <xsl:apply-templates select="//xhtml:a"/>
+ <xsl:element name="title">
+ <xsl:value-of select="//xhtml:h2[1]"/>
+ </xsl:element>
+ <xsl:element name="keywords">
+ <xsl:apply-templates select="//text()[count(preceding::xhtml:br)= 1]"/>
+ </xsl:element>
+ <xsl:element name="description">
+ <xsl:apply-templates select="//text()[count(preceding::xhtml:h2) = 2 and
+ count(following::xhtml:br) >= 4 and count(preceding::xhtml:br) >= 3]"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:template>
+
+
+
+ <xsl:template match="xhtml:a[ text() = 'Record' ]">
+ <xsl:element name="action">
+ <xsl:attribute name="name">
+ <xsl:text>record</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="reference">
+ <xsl:value-of select="@href"/>
+ </xsl:attribute>
+ <xsl:attribute name="type">
+ <xsl:text>recorded</xsl:text>
+ </xsl:attribute>
+ <xsl:text>
+
+ </xsl:text>
+ </xsl:element>
+ </xsl:template>
+
+
+</xsl:stylesheet>