stylesheets are now searched in the classpath.
[utils] / crawler / kiss / src / program-info.xsl
diff --git a/crawler/kiss/src/program-info.xsl b/crawler/kiss/src/program-info.xsl
new file mode 100644 (file)
index 0000000..ec0f979
--- /dev/null
@@ -0,0 +1,56 @@
+<?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:value-of select="//xhtml:h2[1]"/>
+      </xsl:element>
+      <xsl:element name="keywords">
+        <xsl:apply-templates select="//text()[count(preceding::xhtml:br)= 1]"/>
+      </xsl:element>
+      <xsl:element name="description">
+        <xsl:apply-templates select="//text()[count(preceding::xhtml:h2) = 2 and
+          count(following::xhtml:br) >= 4 and count(preceding::xhtml:br) >= 3]"/>
+      </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>