From fff877443ac4611f08c1d09de19b38305f80c40a Mon Sep 17 00:00:00 2001 From: erik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0> Date: Mon, 21 Aug 2006 22:15:51 +0000 Subject: [PATCH] --- .../crawler/kiss/src/program-info-mobile.xsl | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 trunk/crawler/kiss/src/program-info-mobile.xsl diff --git a/trunk/crawler/kiss/src/program-info-mobile.xsl b/trunk/crawler/kiss/src/program-info-mobile.xsl new file mode 100644 index 00000000..d92391f4 --- /dev/null +++ b/trunk/crawler/kiss/src/program-info-mobile.xsl @@ -0,0 +1,63 @@ +<?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:call-template name="string-replace"> + <xsl:with-param name="src" select="//xhtml:tr[1]/xhtml:td[1]"/> + <xsl:with-param name="from" select="$newline"/> + <xsl:with-param name="to" select="''"/> + </xsl:call-template> + </xsl:element> + <xsl:element name="keywords"> + <xsl:call-template name="string-replace"> + <xsl:with-param name="src" select="//xhtml:tr[3]/xhtml:td[3]"/> + <xsl:with-param name="from" select="$newline"/> + <xsl:with-param name="to" select="''"/> + </xsl:call-template> + </xsl:element> + <xsl:element name="description"> + <xsl:apply-templates select="//xhtml:tr[7]/xhtml:td[1]"/> + </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> -- 2.31.1