#Example from David Carlisle to ??? on 10 Feb 2000, with well-formedness corrections
#With a few added variations for more testing
from Xml.Xslt import test_harness
sheet_1 = """
"""
source_1="""
1 2
3 4
5 6
"""
expected_1 = """
123456"""
#Note: this one is tricky. We have the default namespace in exclude-result
#So it shouldn't appear, right? Wrong. The literal result element output
#by the template is actually in the http://duncan.com ns by virtue of default
#So it must be declared as such in the output.
sheet_2 = """
"""
source_2 = """
1 2
3 4
5 6
"""
expected_2 = """
123456"""
sheet_3 = """
"""
source_3 = """
1 2
3 4
5 6
"""
expected_3 = """
123456"""
def Test(tester):
source = test_harness.FileInfo(string=source_1)
sheet = test_harness.FileInfo(string=sheet_1)
test_harness.XsltTest(tester, source, [sheet], expected_1,
title='test 1')
source = test_harness.FileInfo(string=source_2)
sheet = test_harness.FileInfo(string=sheet_2)
test_harness.XsltTest(tester, source, [sheet], expected_2,
title='test 2')
source = test_harness.FileInfo(string=source_3)
sheet = test_harness.FileInfo(string=sheet_3)
test_harness.XsltTest(tester, source, [sheet], expected_3,
title='test 3')
return