1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:xhtml="http://www.w3.org/1999/xhtml"
6 <xsl:template match="/">
7 <xsl:element name="result">
9 <xsl:when test="count(//xhtml:h1[contains(text(), 'Error')]) = 1">
11 <xsl:when test="count(//xhtml:body/text()[contains(., 'already in the')]) =
13 <xsl:text>DUPLICATE</xsl:text>
15 <xsl:when test="count(//xhtml:body/text()[contains(., 'conflicts with a
18 <xsl:text>CONFLICT</xsl:text>
21 <xsl:text>ERROR</xsl:text>
26 <xsl:text>OK</xsl:text>
33 <xsl:template match="xhtml:body">
34 <xsl:value-of select="text()"/>
37 <xsl:template match="text()">
39 <xsl:value-of select="."/>