1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
4 <xsl:template match="report">
7 <title>KiSS crawler report</title>
10 <h1>KiSS crawler report</h1>
11 <xsl:apply-templates select="recorded"/>
12 <xsl:if test="count(interesting) > 0">
13 <h2>Possibly interesting programs</h2>
14 <xsl:apply-templates select="interesting"/>
16 <xsl:if test="count(//program) = 0">
17 <xsl:text>No suitable programs found </xsl:text>
19 <xsl:apply-templates select="messages"/>
25 <xsl:template name="programTable">
27 <table align="left" cellpadding="5">
30 <th align="left">Time</th>
31 <th align="left">Channel</th>
32 <th align="left">Program</th>
35 <xsl:apply-templates select="program"/>
41 <xsl:template match="recorded">
44 <xsl:when test="@result = 'OK'">
45 <xsl:text>Successfully recorded programs </xsl:text>
46 <xsl:call-template name="programTable"/>
48 <xsl:when test="@result = 'DUPLICATE'">
49 <xsl:text>Already recorded programs</xsl:text>
50 <xsl:call-template name="programTable"/>
52 <xsl:when test="@result = 'CONFLICT'">
53 <xsl:text>Conflicts with other recorded programs</xsl:text>
54 <xsl:call-template name="programTable"/>
56 <xsl:when test="@result='ERROR'">
57 <xsl:text>Programs that could not be recorded for
58 technical reasons.</xsl:text>
59 <xsl:call-template name="programTable"/>
65 <xsl:template name="addProgramInfo">
67 <td><xsl:value-of select="interval/begin"/> - <xsl:value-of select="interval/end"/>: <strong>
68 <xsl:value-of select="name"/>
69 </strong> (<xsl:value-of select="channel"/>/<xsl:value-of select="keywords"/>)</td>
76 <xsl:value-of select="description"/>
85 <xsl:template match="program">
86 <xsl:call-template name="addProgramInfo"/>
89 <xsl:template match="interesting">
90 <xsl:call-template name="programTable"/>
91 <xsl:apply-templates select="category"/>
94 <xsl:template match="category">
95 <h3>Category: <xsl:value-of select="@name"/></h3>
96 <xsl:call-template name="programTable"/>
99 <xsl:template match="messages">
102 <xsl:for-each select="message">
104 <xsl:value-of select="."/>