#Miloslav Nic has a cool element/attribute stats tool from Xml.Xslt import test_harness sheet_1 = """ [ ] """ sheet_2 = """ : ( ) """ source_2 = """ c11 c12 c13 c21 c22 c23 c31 c32 c33 """ expected_1 = """ slideshow title metadata speaker jobTitle organization presentationDate presentationLocation occasion slideset slide [ id ] item speakerNote emphasis [ role ] heading bulletlist preformatted graphic [ file height width ] link [ href ] para""" expected_2 = """ bulletlist emphasis role: note(3) graphic file: sample.svg(1) height: 800(1) width: 800(1) heading item jobTitle link href: http://dmoz.org/Computers/Data_Formats/Graphics/Vector/SVG/(1) http://www.sun.com/xml/developers/svg-slidetoolkit/(1) http://www.w3.org/Graphics/SVG(1) metadata occasion organization para preformatted presentationDate presentationLocation slide id: I.1(1) II.1(1) II.2(1) II.3(1) III.1(1) III.2(1) slideset slideshow speaker speakerNote title""" expected_3 = """ AAA BBB bb: 1(1) 2(2) ccc: OOOOO(1) CCC ccc: AAA(1) XXX(2) ZZZ(1) sss: WWWW(1) uuu: 234(1) XXX""" def Test(tester): source = test_harness.FileInfo(uri="Xml/Xslt/Borrowed/slides4svg.xml") sheet = test_harness.FileInfo(string=sheet_1) test_harness.XsltTest(tester, source, [sheet], expected_1, title='test 1') source = test_harness.FileInfo(uri="Xml/Xslt/Borrowed/slides4svg.xml") sheet = test_harness.FileInfo(string=sheet_2) test_harness.XsltTest(tester, source, [sheet], expected_2, title='test 2') source = test_harness.FileInfo(string=source_2) sty = test_harness.FileInfo(string=sheet_2) test_harness.XsltTest(tester, source, [sheet], expected_3, title='test 3') return