(no commit message)
[utils] / crawler / kiss / src / main / resources / program-info-mobile.xsl
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"
4   version="1.0">
5   
6   <xsl:output method="xml"/>
7   <xsl:strip-space elements="xhtml:a"/>
8   
9   <xsl:include href="utilities.xsl"/>
10   
11   <!-- =====================================================
12     Copying template.
13     ===================================================== -->
14   <xsl:template match="@*|node()" mode="copy">
15     <xsl:copy>
16       <xsl:apply-templates select="@*|node()" mode="copy"/>
17     </xsl:copy>
18   </xsl:template>
19   
20   <xsl:template match="/">
21     <xsl:element name="program-info">
22       <xsl:apply-templates select="//xhtml:a"/>
23       <xsl:element name="title">
24         <xsl:call-template name="string-replace">
25           <xsl:with-param name="src" select="//xhtml:tr[1]/xhtml:td[1]"/>
26           <xsl:with-param name="from" select="$newline"/>
27           <xsl:with-param name="to" select="''"/>
28         </xsl:call-template>
29       </xsl:element>
30       <xsl:element name="keywords">
31         <xsl:call-template name="string-replace">
32           <xsl:with-param name="src" select="//xhtml:tr[3]/xhtml:td[3]"/>
33           <xsl:with-param name="from" select="$newline"/>
34           <xsl:with-param name="to" select="''"/>
35         </xsl:call-template>
36       </xsl:element>
37       <xsl:element name="description">
38         <xsl:apply-templates select="//xhtml:tr[7]/xhtml:td[1]"/>
39       </xsl:element>
40     </xsl:element>
41   </xsl:template>
42   
43   
44   
45   <xsl:template match="xhtml:a[ text() = 'Record' ]">
46      <xsl:element name="action">
47        <xsl:attribute name="name">
48          <xsl:text>record</xsl:text>
49        </xsl:attribute>
50        <xsl:attribute name="reference">
51          <xsl:value-of select="@href"/>
52        </xsl:attribute>
53        <xsl:attribute name="type">
54          <xsl:text>recorded</xsl:text>
55        </xsl:attribute>
56        <xsl:text>
57          
58        </xsl:text>
59      </xsl:element>
60   </xsl:template>
61   
62   
63 </xsl:stylesheet>