stylesheets are now searched in the classpath.
[utils] / crawler / kiss / src / channel-right-now.xsl
diff --git a/crawler/kiss/src/channel-right-now.xsl b/crawler/kiss/src/channel-right-now.xsl
new file mode 100644 (file)
index 0000000..5885f71
--- /dev/null
@@ -0,0 +1,51 @@
+<?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="channel-right-now">
+      <xsl:apply-templates select="//xhtml:a"/>
+    </xsl:element>
+  </xsl:template>
+  
+  <xsl:template match="xhtml:a[ count(following::xhtml:a) >= 3]">
+     <xsl:element name="action">
+       <xsl:attribute name="name">
+         <xsl:call-template name="string-replace">
+           <xsl:with-param name="src" select="text()"/>
+           <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="@href"/>
+       </xsl:attribute>
+       <xsl:element name="time">
+         <xsl:value-of select="preceding-sibling::text()[1]"/>
+       </xsl:element>
+     </xsl:element>
+    <xsl:text>
+      
+    </xsl:text>
+  </xsl:template>
+  
+  
+</xsl:stylesheet>