Now crawling in desktop mode should work. It is much more efficient
[utils] / crawler / kiss / src / channel-right-now-graphic.xsl
index 43356172bacef0170467a717d32f4645b415baa1..6b5070c43425a4a2d4b2cba6a0a3aceb7db61023 100644 (file)
@@ -1,13 +1,12 @@
 <?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">
-  
+  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:apply-templates select="@*|node()" mode="copy"/>
     </xsl:copy>
   </xsl:template>
-  
+
   <xsl:template match="/">
     <xsl:element name="channel-right-now">
-      <xsl:apply-templates select="//xhtml:table[3]//xhtml:tr[xhtml:td[not(contains(@class, 'listCell'))]]"/>
+      <xsl:apply-templates
+        select="//xhtml:table[3]//xhtml:tr[xhtml:td[not(contains(@class, 'listCell'))]]"/>
     </xsl:element>
   </xsl:template>
-  
+
   <xsl:template match="xhtml:tr">
-     <xsl:element name="action">
-       <xsl:attribute name="name">
-         <xsl:call-template name="string-replace">
-           <xsl:with-param name="src" select="xhtml:td[3]//xhtml:a"/>
-           <xsl:with-param name="from" select="$newline"/>
-           <xsl:with-param name="to" select="''"/>
-         </xsl:call-template>
-       </xsl:attribute>
-       <xsl:attribute name="type">
-         <xsl:text>program-info</xsl:text>
-       </xsl:attribute>
-       <xsl:attribute name="reference">
-         <xsl:value-of select="xhtml:td[3]//xhtml:a/@href"/>
-       </xsl:attribute>
-       <xsl:element name="time">
-         <xsl:call-template name="string-replace">
-           <xsl:with-param name="src" select="xhtml:td[1]"/>
-           <xsl:with-param name="from" select="$newline"/>
-           <xsl:with-param name="to" select="''"/>
-         </xsl:call-template>
-       </xsl:element>
-       <xsl:apply-templates select=".//xhtml:script"/>
-     </xsl:element>
+    <xsl:element name="action">
+      <xsl:attribute name="name">
+        <xsl:call-template name="string-replace">
+          <xsl:with-param name="src" select="xhtml:td[3]//xhtml:a"/>
+          <xsl:with-param name="from" select="$newline"/>
+          <xsl:with-param name="to" select="''"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="type">
+        <xsl:text>program-info</xsl:text>
+      </xsl:attribute>
+      <xsl:attribute name="reference">
+        <xsl:value-of select="xhtml:td[3]//xhtml:a/@href"/>
+      </xsl:attribute>
+      <xsl:element name="time">
+        <xsl:call-template name="string-replace">
+          <xsl:with-param name="src" select="xhtml:td[1]"/>
+          <xsl:with-param name="from" select="$newline"/>
+          <xsl:with-param name="to" select="''"/>
+        </xsl:call-template>
+      </xsl:element>
+      <xsl:apply-templates select=".//xhtml:script"/>
+    </xsl:element>
     <xsl:text>
       
     </xsl:text>
   </xsl:template>
-  
+
   <xsl:template match="xhtml:script">
     <xsl:variable name="script">
-      <xsl:value-of select="."/>   
+      <xsl:value-of select="."/>
     </xsl:variable>
     <xsl:variable name="description">
-      <xsl:value-of select="substring-before(substring-after($script, '&lt;br&gt;'), '&quot;]')"/> 
-    </xsl:variable>>
-    <xsl:if test="string-length($description) > 0 ">
-      <description>
-        <xsl:value-of select="$description"/>
-      </description>
-    </xsl:if>
-     
+      <xsl:value-of
+        select="substring-before(substring-after($script, '&lt;br&gt;'), '&quot;]')"/>
+    </xsl:variable>
+    <description>
+      <xsl:value-of select="$description"/>
+    </description>
+
   </xsl:template>
-  
+
 </xsl:stylesheet>