#From Robert Sanderson AKA azaroth42
from Xml.Xslt import test_harness
EXPECTED_1 = """\n"""
from Ft.Xml.Xslt.Processor import Processor
from Ft.Xml.InputSource import DefaultFactory
processor = Processor()
TRANSFORM_2 = """
Starting...
Finished.
Now!
"""
EXPECTED = 'Starting...Finished.'
def Test(tester):
# We don't use test_harness.XsltTest and friends because they hide
# away the API details we're testing in this module.
# See http://bugs.4suite.org/641693
tester.startGroup("Test multiple stylesheet invokation")
transform = DefaultFactory.fromString(TRANSFORM_2, "http://foo.com/")
processor.appendStylesheet(transform)
results = ["nope",
"now",
"now"]
for x in range(0,2):
SOURCE = results[x]
source = DefaultFactory.fromString(SOURCE, "file:bogus.xml")
result = processor.run(source)
tester.compare(result, EXPECTED)
tester.groupDone()
return