Permalink
Browse files

report improvement more tests Daniel

* schematron.c: report improvement
* test/schematron/zvon* result/schematron/zvon*: more tests
Daniel
  • Loading branch information...
1 parent 5fe95a8 commit d541c8f8b460c7a82c1d2142706372f681293f75 Daniel Veillard committed Jul 31, 2005
Showing with 575 additions and 6 deletions.
  1. +5 −0 ChangeLog
  2. +4 −0 result/schematron/zvon11_0
  3. +2 −0 result/schematron/zvon11_0.err
  4. +4 −0 result/schematron/zvon11_1
  5. +3 −0 result/schematron/zvon11_1.err
  6. +4 −0 result/schematron/zvon11_2
  7. +3 −0 result/schematron/zvon11_2.err
  8. +4 −0 result/schematron/zvon11_3
  9. +2 −0 result/schematron/zvon11_3.err
  10. +4 −0 result/schematron/zvon12_0
  11. +3 −0 result/schematron/zvon12_0.err
  12. +4 −0 result/schematron/zvon12_1
  13. +2 −0 result/schematron/zvon12_1.err
  14. +4 −0 result/schematron/zvon12_2
  15. +3 −0 result/schematron/zvon12_2.err
  16. +7 −0 result/schematron/zvon13_0
  17. +3 −0 result/schematron/zvon13_0.err
  18. +6 −0 result/schematron/zvon13_1
  19. +3 −0 result/schematron/zvon13_1.err
  20. +6 −0 result/schematron/zvon13_2
  21. +2 −0 result/schematron/zvon13_2.err
  22. +13 −0 result/schematron/zvon14_0
  23. +4 −0 result/schematron/zvon14_0.err
  24. +5 −0 result/schematron/zvon15_0
  25. +4 −0 result/schematron/zvon15_0.err
  26. +7 −0 result/schematron/zvon4_0
  27. +3 −0 result/schematron/zvon4_0.err
  28. +7 −0 result/schematron/zvon4_1
  29. +3 −0 result/schematron/zvon4_1.err
  30. +6 −0 result/schematron/zvon5_0
  31. +7 −0 result/schematron/zvon5_0.err
  32. +6 −0 result/schematron/zvon5_1
  33. +5 −0 result/schematron/zvon5_1.err
  34. +8 −0 result/schematron/zvon5_2
  35. +5 −0 result/schematron/zvon5_2.err
  36. +4 −0 result/schematron/zvon6_0
  37. +3 −0 result/schematron/zvon6_0.err
  38. +4 −0 result/schematron/zvon6_1
  39. +3 −0 result/schematron/zvon6_1.err
  40. +4 −0 result/schematron/zvon6_2
  41. +3 −0 result/schematron/zvon6_2.err
  42. +4 −0 result/schematron/zvon7_0
  43. +3 −0 result/schematron/zvon7_0.err
  44. +4 −0 result/schematron/zvon7_1
  45. +3 −0 result/schematron/zvon7_1.err
  46. +4 −0 result/schematron/zvon7_2
  47. +3 −0 result/schematron/zvon7_2.err
  48. +4 −0 result/schematron/zvon7_3
  49. +3 −0 result/schematron/zvon7_3.err
  50. +4 −0 result/schematron/zvon7_4
  51. +3 −0 result/schematron/zvon7_4.err
  52. +9 −0 result/schematron/zvon8_0
  53. +3 −0 result/schematron/zvon8_0.err
  54. +8 −0 result/schematron/zvon8_1
  55. +3 −0 result/schematron/zvon8_1.err
  56. +8 −0 result/schematron/zvon8_2
  57. +3 −0 result/schematron/zvon8_2.err
  58. +8 −0 result/schematron/zvon9_0
  59. +2 −0 result/schematron/zvon9_0.err
  60. +8 −0 result/schematron/zvon9_1
  61. +3 −0 result/schematron/zvon9_1.err
  62. +8 −0 result/schematron/zvon9_2
  63. +3 −0 result/schematron/zvon9_2.err
  64. +41 −6 schematron.c
  65. +8 −0 test/schematron/zvon11.sct
  66. +3 −0 test/schematron/zvon11_0.xml
  67. +3 −0 test/schematron/zvon11_1.xml
  68. +3 −0 test/schematron/zvon11_2.xml
  69. +3 −0 test/schematron/zvon11_3.xml
  70. +8 −0 test/schematron/zvon12.sct
  71. +3 −0 test/schematron/zvon12_0.xml
  72. +3 −0 test/schematron/zvon12_1.xml
  73. +3 −0 test/schematron/zvon12_2.xml
  74. +7 −0 test/schematron/zvon13.sct
  75. +6 −0 test/schematron/zvon13_0.xml
  76. +5 −0 test/schematron/zvon13_1.xml
  77. +5 −0 test/schematron/zvon13_2.xml
  78. +10 −0 test/schematron/zvon14.sct
  79. +12 −0 test/schematron/zvon14_0.xml
  80. +11 −0 test/schematron/zvon15.sct
  81. +4 −0 test/schematron/zvon15_0.xml
  82. +10 −0 test/schematron/zvon4.sct
  83. +6 −0 test/schematron/zvon4_0.xml
  84. +6 −0 test/schematron/zvon4_1.xml
  85. +12 −0 test/schematron/zvon5.sct
  86. +5 −0 test/schematron/zvon5_0.xml
  87. +5 −0 test/schematron/zvon5_1.xml
  88. +7 −0 test/schematron/zvon5_2.xml
  89. +8 −0 test/schematron/zvon6.sct
  90. +3 −0 test/schematron/zvon6_0.xml
  91. +3 −0 test/schematron/zvon6_1.xml
  92. +3 −0 test/schematron/zvon6_2.xml
  93. +9 −0 test/schematron/zvon7.sct
  94. +3 −0 test/schematron/zvon7_0.xml
  95. +3 −0 test/schematron/zvon7_1.xml
  96. +3 −0 test/schematron/zvon7_2.xml
  97. +3 −0 test/schematron/zvon7_3.xml
  98. +3 −0 test/schematron/zvon7_4.xml
  99. +10 −0 test/schematron/zvon8.sct
  100. +8 −0 test/schematron/zvon8_0.xml
  101. +7 −0 test/schematron/zvon8_1.xml
  102. +7 −0 test/schematron/zvon8_2.xml
  103. +9 −0 test/schematron/zvon9.sct
  104. +7 −0 test/schematron/zvon9_0.xml
  105. +7 −0 test/schematron/zvon9_1.xml
  106. +7 −0 test/schematron/zvon9_2.xml
View
@@ -1,3 +1,8 @@
+Sun Jul 31 18:48:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * schematron.c: report improvement
+ * test/schematron/zvon* result/schematron/zvon*: more tests
+
Sun Jul 31 16:02:59 CEST 2005 Daniel Veillard <daniel@veillard.com>
* win32/Makefile.msvc win32/configure.js: applied patch from Rob
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB aaa="A" bbb="B"/>
+</AAA>
@@ -0,0 +1,2 @@
+Pattern: Attributes present
+./test/schematron/zvon11_0.xml validates
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB bbb="B"/>
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Attributes present
+/AAA/BBB line 2: The element must not have an isolated bbb attribute
+./test/schematron/zvon11_1.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB aaa="A"/>
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Attributes present
+/AAA/BBB line 2: The element must not have an isolated aaa attribute
+./test/schematron/zvon11_2.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB/>
+</AAA>
@@ -0,0 +1,2 @@
+Pattern: Attributes present
+./test/schematron/zvon11_3.xml validates
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB bbb="C"/>
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Number of characters in an abbreviation
+/AAA/BBB line 2: There is not enough letters in the abbreviation
+./test/schematron/zvon12_0.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB bbb="CZ"/>
+</AAA>
@@ -0,0 +1,2 @@
+Pattern: Number of characters in an abbreviation
+./test/schematron/zvon12_1.xml validates
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB bbb="CZCZ"/>
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Number of characters in an abbreviation
+/AAA/BBB line 2: There is too much letters in the abbreviation
+./test/schematron/zvon12_2.xml fails to validate
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<Total>
+ <Percent>20</Percent>
+ <Percent>30</Percent>
+ <Percent>10</Percent>
+ <Percent>50</Percent>
+</Total>
@@ -0,0 +1,3 @@
+Pattern: Sum equals 100%.
+/Total line 1: The values do not sum to 100%.
+./test/schematron/zvon13_0.xml fails to validate
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<Total>
+ <Percent>20</Percent>
+ <Percent>10</Percent>
+ <Percent>50</Percent>
+</Total>
@@ -0,0 +1,3 @@
+Pattern: Sum equals 100%.
+/Total line 1: The values do not sum to 100%.
+./test/schematron/zvon13_1.xml fails to validate
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<Total>
+ <Percent>20</Percent>
+ <Percent>30</Percent>
+ <Percent>50</Percent>
+</Total>
@@ -0,0 +1,2 @@
+Pattern: Sum equals 100%.
+./test/schematron/zvon13_2.xml validates
View
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB>
+ <CCC/>
+ </BBB>
+ <CCC/>
+ <DDD>
+ <CCC/>
+ <EEE>
+ <CCC/>
+ </EEE>
+ </DDD>
+</AAA>
@@ -0,0 +1,4 @@
+Pattern: a child of selected elements
+/AAA/CCC line 5: Element CCC must not be a child of element AAA
+/AAA/DDD/EEE/CCC line 9: Element CCC must not be a child of element EEE
+./test/schematron/zvon14_0.xml fails to validate
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<AAA name="aaa">
+<BBB id="bbb"/>
+<CCC color="ccc"/>
+</AAA>
@@ -0,0 +1,4 @@
+Pattern: id is the only permited attribute name
+/AAA line 1: Attribute name is forbidden in element AAA
+/AAA/CCC line 3: Attribute color is forbidden in element CCC
+./test/schematron/zvon15_0.xml fails to validate
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB>
+ <CCC/>
+ <CCC/>
+ </BBB>
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Root test
+/AAA line 1: Root element is AAA
+./test/schematron/zvon4_0.xml fails to validate
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<XXX>
+ <BBB>
+ <CCC/>
+ <CCC/>
+ </BBB>
+</XXX>
@@ -0,0 +1,3 @@
+Pattern: Root test
+/XXX line 1: Root element is XXX, not AAA
+./test/schematron/zvon4_1.xml fails to validate
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB>
+ <CCC/>
+ </BBB>
+</AAA>
@@ -0,0 +1,7 @@
+Pattern: Select empty elements CCC
+/AAA/BBB/CCC line 3: Source contains an empty element CCC
+/AAA/BBB/CCC line 3: [1]An element CCC does not contain any text
+/AAA/BBB/CCC line 3: [2]An element CCC does not contain any text
+/AAA/BBB/CCC line 3: [1]An element CCC does not contain any child element
+/AAA/BBB/CCC line 3: [2]An element CCC does not contain any child element
+./test/schematron/zvon5_0.xml fails to validate
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB>
+ <CCC>I am CCC element</CCC>
+ </BBB>
+</AAA>
@@ -0,0 +1,5 @@
+Pattern: Select empty elements CCC
+/AAA/BBB/CCC line 3: Source contains an empty element CCC
+/AAA/BBB/CCC line 3: [1]An element CCC does not contain any child element
+/AAA/BBB/CCC line 3: [2]An element CCC does not contain any child element
+./test/schematron/zvon5_1.xml fails to validate
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<AAA>
+ <BBB>
+ <CCC>
+ <DDD/>
+ </CCC>
+ </BBB>
+</AAA>
@@ -0,0 +1,5 @@
+Pattern: Select empty elements CCC
+/AAA/BBB/CCC line 3: Source contains an empty element CCC
+/AAA/BBB/CCC line 3: [1]An element CCC does not contain any text
+/AAA/BBB/CCC line 3: [2]An element CCC does not contain any text
+./test/schematron/zvon5_2.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+aaa
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Predefined values
+/AAA line 1: O.K.
+./test/schematron/zvon6_0.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ bbb
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Predefined values
+/AAA line 1: O.K.
+./test/schematron/zvon6_1.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ ccc
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Predefined values
+/AAA line 1: The AAA value is not permitted.
+./test/schematron/zvon6_2.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+aaa
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Test integer
+/AAA line 1: The AAA value is not an integer.
+./test/schematron/zvon7_0.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+ 12.234
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Test integer
+/AAA line 1: The AAA value is not an integer.
+./test/schematron/zvon7_1.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+45
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Test integer
+/AAA line 1: O.K.
+./test/schematron/zvon7_2.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+0
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Test integer
+/AAA line 1: O.K.
+./test/schematron/zvon7_3.xml fails to validate
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<AAA>
+-45
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Test integer
+/AAA line 1: O.K.
+./test/schematron/zvon7_4.xml fails to validate
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<XXX>
+ <BBB/>
+ <BBB/>
+ <AAA/>
+ <BBB/>
+ <AAA/>
+ <AAA/>
+</XXX>
@@ -0,0 +1,3 @@
+Pattern: Test count
+/XXX line 1: O.K.
+./test/schematron/zvon8_0.xml fails to validate
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<XXX>
+ <BBB/>
+ <AAA/>
+ <BBB/>
+ <AAA/>
+ <AAA/>
+</XXX>
@@ -0,0 +1,3 @@
+Pattern: Test count
+/XXX line 1: Some BBB are missing
+./test/schematron/zvon8_1.xml fails to validate
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<XXX>
+ <BBB/>
+ <BBB/>
+ <AAA/>
+ <BBB/>
+ <AAA/>
+</XXX>
@@ -0,0 +1,3 @@
+Pattern: Test count
+/XXX line 1: Some AAA are missing
+./test/schematron/zvon8_2.xml fails to validate
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<AAA>
+ <CCC/>
+ <CCC/>
+ <BBB>
+ <CCC id="Q1"/>
+ </BBB>
+</AAA>
@@ -0,0 +1,2 @@
+Pattern: Test attribute
+./test/schematron/zvon9_0.xml validates
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<AAA>
+ <CCC id="Q2"/>
+ <CCC/>
+ <BBB>
+ <CCC id="Q1"/>
+ </BBB>
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Test attribute
+/AAA/CCC[1] line 2: Attribute id is used in wrong context
+./test/schematron/zvon9_1.xml fails to validate
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<AAA>
+ <CCC/>
+ <CCC/>
+ <BBB>
+ <CCC/>
+ </BBB>
+</AAA>
@@ -0,0 +1,3 @@
+Pattern: Test attribute
+/AAA/BBB/CCC line 5: Attribute id is missing
+./test/schematron/zvon9_2.xml fails to validate
Oops, something went wrong.

0 comments on commit d541c8f

Please sign in to comment.