1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:xhtml="http://www.w3.org/1999/xhtml"
6 <xsl:output method="xml"/>
7 <xsl:strip-space elements="xhtml:a"/>
9 <xsl:include href="utilities.xsl"/>
11 <!-- =====================================================
13 ===================================================== -->
14 <xsl:template match="@*|node()" mode="copy">
16 <xsl:apply-templates select="@*|node()" mode="copy"/>
20 <xsl:template match="/">
21 <xsl:element name="program-info">
22 <xsl:apply-templates select="//xhtml:a"/>
23 <xsl:element name="title">
24 <xsl:value-of select="//xhtml:h2[1]"/>
26 <xsl:element name="keywords">
27 <xsl:apply-templates select="//text()[count(preceding::xhtml:br)= 1]"/>
29 <xsl:element name="description">
30 <xsl:apply-templates select="//text()[count(preceding::xhtml:h2) = 2 and
31 count(following::xhtml:br) >= 4 and count(preceding::xhtml:br) >= 3]"/>
38 <xsl:template match="xhtml:a[ text() = 'Record' ]">
39 <xsl:element name="action">
40 <xsl:attribute name="name">
41 <xsl:text>record</xsl:text>
43 <xsl:attribute name="reference">
44 <xsl:value-of select="@href"/>
46 <xsl:attribute name="type">
47 <xsl:text>recorded</xsl:text>