(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 17 Mar 2006 19:31:07 +0000 (19:31 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 17 Mar 2006 19:31:07 +0000 (19:31 +0000)
crawler/kiss/conf/kiss/recorded.xsl [new file with mode: 0644]

diff --git a/crawler/kiss/conf/kiss/recorded.xsl b/crawler/kiss/conf/kiss/recorded.xsl
new file mode 100644 (file)
index 0000000..21b0b7f
--- /dev/null
@@ -0,0 +1,41 @@
+<?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:template match="/">
+        <xsl:element name="result">
+            <xsl:choose>
+                <xsl:when test="count(//xhtml:h1[contains(text(), 'Error')]) = 1">
+                    <xsl:choose>
+                        <xsl:when test="count(//xhtml:body/text()[contains(., 'already in the')]) =
+                            1">
+                            <xsl:text>duplicate</xsl:text>
+                        </xsl:when>
+                        <xsl:when test="count(//xhtml:body/text()[contains(., 'conflicts with a
+                            recording')]) =
+                            1">
+                            <xsl:text>conflict</xsl:text>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            error
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:text>ok</xsl:text>
+                </xsl:otherwise>
+            </xsl:choose>
+            
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="xhtml:body">
+        <xsl:value-of select="text()"/>
+    </xsl:template>
+    
+    <xsl:template match="text()">
+        TEXT NODE
+        <xsl:value-of select="."/>
+    </xsl:template>
+</xsl:stylesheet>