1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3 <xsl:output method="text"/>
5 <xsl:include href="utilities.xsl"/>
6 <xsl:template match="report">
7 <xsl:text>KiSS crawler report</xsl:text>
8 <xsl:value-of select="$newline"/>
9 <xsl:value-of select="$newline"/>
11 <xsl:apply-templates select="recorded"/>
12 <xsl:if test="count(interesting) > 0">
13 <xsl:text>Possibly interesting programs</xsl:text>
14 <xsl:value-of select="$newline"/>
15 <xsl:value-of select="$newline"/>
17 <xsl:apply-templates select="interesting"/>
21 <xsl:template name="programTable">
22 <xsl:apply-templates select="program"/>
24 <xsl:template match="recorded">
26 <xsl:when test="@result = 'OK'">
27 <xsl:text>Successfully recorded programs </xsl:text>
28 <xsl:value-of select="$newline"/>
29 <xsl:value-of select="$newline"/>
31 <xsl:when test="@result = 'DUPLICATE'">
32 <xsl:text>Already recorded programs</xsl:text>
33 <xsl:value-of select="$newline"/>
34 <xsl:value-of select="$newline"/>
36 <xsl:when test="@result = 'CONFLICT'">
37 <xsl:text>Conflicts with other recorded program</xsl:text>
38 <xsl:value-of select="$newline"/>
39 <xsl:value-of select="$newline"/>
41 <xsl:when test="@result='ERROR'">
42 <xsl:text>Programs that could not be recorded for technical reasons.</xsl:text>
43 <xsl:value-of select="$newline"/>
44 <xsl:value-of select="$newline"/>
48 <xsl:call-template name="programTable"/>
52 <xsl:template name="addProgramInfo">
53 <xsl:text>*</xsl:text>
54 <xsl:value-of select="interval/begin"/> - <xsl:value-of select="interval/end"/>
55 <xsl:text>: </xsl:text>
56 <xsl:value-of select="name"/>
57 <xsl:text>(</xsl:text>
58 <xsl:value-of select="channel"/>
59 <xsl:text>/</xsl:text><xsl:value-of select="keywords"/>
60 <xsl:text>)</xsl:text>
61 <xsl:value-of select="$newline"/>
62 <xsl:variable name="indent">
63 <xsl:text> </xsl:text>
65 <xsl:call-template name="indent">
66 <xsl:with-param name="src">
67 <xsl:call-template name="word-wrap">
68 <xsl:with-param name="src"><xsl:value-of select="description"/></xsl:with-param>
69 <xsl:with-param name="width"><xsl:value-of select="72"/></xsl:with-param>
72 <xsl:with-param name="indentString">
73 <xsl:text> </xsl:text>
79 <xsl:value-of select="$indent"/>
80 <xsl:call-template name="string-replace">
81 <xsl:with-param name="src"><xsl:value-of select="description"/></xsl:with-param>
82 <xsl:with-param name="from"><xsl:value-of select="$newline"/></xsl:with-param>
83 <xsl:with-param name="to"><xsl:value-of select="$newline"/><xsl:value-of select="$indent"/></xsl:with-param>
86 <xsl:value-of select="$newline"/>
87 <xsl:value-of select="$newline"/>
90 <xsl:template match="program">
91 <xsl:call-template name="addProgramInfo"/>
94 <xsl:template match="interesting">
95 <xsl:call-template name="programTable"/>
96 <xsl:apply-templates select="category"/>
99 <xsl:template match="category">
100 <xsl:text>Category: </xsl:text><xsl:value-of select="@name"/>
101 <xsl:value-of select="$newline"/>
102 <xsl:value-of select="$newline"/>
103 <xsl:call-template name="programTable"/>