#Olivier Cayrol reports output bug

from Xslt import test_harness

sheet_1 = """\
<xsl:stylesheet version='1.0'
                xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

  <xsl:template match='condition'>
    <xsl:element name='template'>
      <xsl:attribute name='match'>
        <xsl:value-of select='.'/>
      </xsl:attribute>
      <xsl:text>This is a good one</xsl:text>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>
"""

source_1 = "<condition>car[@price &lt; 1000]</condition>"

expected_1 = """<?xml version='1.0' encoding='UTF-8'?>
<template match='car[@price &lt; 1000]'>This is a good one</template>"""

def Test(tester):
    tester.startGroup("Borrowed: oc_20010315")
    source = test_harness.FileInfo(string=source_1)
    sty = test_harness.FileInfo(string=sheet_1)
    xtest = test_harness.XsltTester(source,
                                    [sty],
                                    expected_1,
                                    compareFunc = cmp,
                                    )

    xtest.test(tester)
    tester.groupDone()
    return