#Uche's test from Sun's SVG slide publisher import os from Xml.Xslt import test_harness #From Sun's toolkit sheet_1_uri = "Xml/Xslt/Borrowed/svgslides.xsl" sheet_2_uri = "Xml/Xslt/Borrowed/svgslides_custom.xsl" sheet_3_uri = "Xml/Xslt/Borrowed/slidescript.xsl" source_1_uri = "Xml/Xslt/Borrowed/slides4svg.xml" saxon_output = """""" expected_1 = """ Background and Motivation The ABCs of SVG The SVG Community """ #"' expected_1=""" """ def Test(tester): tester.startTest("Checking for SVG stylesheets") try: import urllib for uri in (sheet_1_uri, sheet_2_uri, sheet_3_uri): fd = urllib.urlopen(uri) fd.close() tester.testDone() except (IOError, OSError): tester.warning( "You must have 'svgslides.xsl', 'svgslides_custom.xsl' and\n" "'slidescript.xsl' from Sun's SVG toolkit to run this test.\n" "See http://www.sun.com/software/xml/developers/svg-slidetoolkit/\n" "or ftp://ftp.fourthought.com/pub/third-party/test-material/\n" "It's enough to copy *.xsl from that package to the\n" "'%s' directory." % os.path.dirname(__file__)) tester.testDone() else: source = test_harness.FileInfo(uri=source_1_uri) sheet = test_harness.FileInfo(uri=sheet_1_uri) test_harness.XsltTest(tester, source, [sheet], expected_1) return