simple-xspec-wrapper 0.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +11 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/Gemfile +6 -0
  8. data/Gemfile.lock +37 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +49 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/exe/xspec +16 -0
  15. data/lib/xspec/version.rb +3 -0
  16. data/lib/xspec.rb +256 -0
  17. data/simple-xspec-wrapper.gemspec +28 -0
  18. data/spec-test.xml +1125 -0
  19. data/vendor/xspec-1.0.0/.gitignore +7 -0
  20. data/vendor/xspec-1.0.0/.travis.yml +57 -0
  21. data/vendor/xspec-1.0.0/LICENSE +21 -0
  22. data/vendor/xspec-1.0.0/README.md +26 -0
  23. data/vendor/xspec-1.0.0/appveyor.yml +77 -0
  24. data/vendor/xspec-1.0.0/bin/xspec.bat +620 -0
  25. data/vendor/xspec-1.0.0/bin/xspec.sh +403 -0
  26. data/vendor/xspec-1.0.0/build.xml +369 -0
  27. data/vendor/xspec-1.0.0/editors/emacs/README +31 -0
  28. data/vendor/xspec-1.0.0/editors/emacs/schemas.xml +6 -0
  29. data/vendor/xspec-1.0.0/editors/oxygen/.cvsignore +2 -0
  30. data/vendor/xspec-1.0.0/editors/oxygen/README +11 -0
  31. data/vendor/xspec-1.0.0/editors/oxygen/build.xml +38 -0
  32. data/vendor/xspec-1.0.0/editors/oxygen/templates/xspec.xml +17 -0
  33. data/vendor/xspec-1.0.0/editors/oxygen/xspec.framework +175 -0
  34. data/vendor/xspec-1.0.0/find-examples.xml +37 -0
  35. data/vendor/xspec-1.0.0/find-examples.xsl +615 -0
  36. data/vendor/xspec-1.0.0/graphics/3angle-down.gif +0 -0
  37. data/vendor/xspec-1.0.0/graphics/3angle-right.gif +0 -0
  38. data/vendor/xspec-1.0.0/java/com/jenitennison/xslt/tests/XSLTCoverageTraceListener.class +0 -0
  39. data/vendor/xspec-1.0.0/java/com/jenitennison/xslt/tests/XSLTCoverageTraceListener.java +209 -0
  40. data/vendor/xspec-1.0.0/src/ant/find-test-failure.xsl +17 -0
  41. data/vendor/xspec-1.0.0/src/ant/get-schematron-phase.xsl +17 -0
  42. data/vendor/xspec-1.0.0/src/ant/locate-schematron.xsl +28 -0
  43. data/vendor/xspec-1.0.0/src/ant/make-path.js +4 -0
  44. data/vendor/xspec-1.0.0/src/compiler/generate-common-tests.xsl +604 -0
  45. data/vendor/xspec-1.0.0/src/compiler/generate-query-helper.xsl +152 -0
  46. data/vendor/xspec-1.0.0/src/compiler/generate-query-tests.xsl +473 -0
  47. data/vendor/xspec-1.0.0/src/compiler/generate-query-utils.xql +263 -0
  48. data/vendor/xspec-1.0.0/src/compiler/generate-tests-helper.xsl +169 -0
  49. data/vendor/xspec-1.0.0/src/compiler/generate-tests-utils.xsl +479 -0
  50. data/vendor/xspec-1.0.0/src/compiler/generate-xspec-tests.xsl +503 -0
  51. data/vendor/xspec-1.0.0/src/harnesses/basex/basex-standalone-xquery-harness.xproc +135 -0
  52. data/vendor/xspec-1.0.0/src/harnesses/basex/basex-xquery-harness.xproc +133 -0
  53. data/vendor/xspec-1.0.0/src/harnesses/exist/exist-xquery-harness.xproc +161 -0
  54. data/vendor/xspec-1.0.0/src/harnesses/harness-lib.xpl +327 -0
  55. data/vendor/xspec-1.0.0/src/harnesses/marklogic/ml-xquery-harness.xproc +143 -0
  56. data/vendor/xspec-1.0.0/src/harnesses/saxon/saxon-xquery-harness.xproc +108 -0
  57. data/vendor/xspec-1.0.0/src/harnesses/saxon/saxon-xslt-harness.xproc +85 -0
  58. data/vendor/xspec-1.0.0/src/harnesses/zorba/zorba-xquery-harness.xproc +134 -0
  59. data/vendor/xspec-1.0.0/src/reporter/coverage-report.xsl +378 -0
  60. data/vendor/xspec-1.0.0/src/reporter/format-utils.xsl +220 -0
  61. data/vendor/xspec-1.0.0/src/reporter/format-xspec-report-folding.xsl +164 -0
  62. data/vendor/xspec-1.0.0/src/reporter/format-xspec-report.xsl +410 -0
  63. data/vendor/xspec-1.0.0/src/reporter/junit-report.xsl +93 -0
  64. data/vendor/xspec-1.0.0/src/reporter/test-report.css +469 -0
  65. data/vendor/xspec-1.0.0/src/schemas/find-examples.rnc +90 -0
  66. data/vendor/xspec-1.0.0/src/schemas/xspec.rnc +304 -0
  67. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_abstract_expand.xsl +313 -0
  68. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_dsdl_include.xsl +1519 -0
  69. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_message.xsl +64 -0
  70. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_message_xslt2.xsl +64 -0
  71. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_skeleton_for_saxon.xsl +2306 -0
  72. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_skeleton_for_xslt1.xsl +1851 -0
  73. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_svrl_for_xslt1.xsl +614 -0
  74. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_svrl_for_xslt2.xsl +692 -0
  75. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/readme.txt +101 -0
  76. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-cs.xhtml +56 -0
  77. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-de.xhtml +55 -0
  78. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-en.xhtml +57 -0
  79. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-fr.xhtml +54 -0
  80. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-ja.xhtml +53 -0
  81. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-nl.xhtml +58 -0
  82. data/vendor/xspec-1.0.0/src/schematron/iso-schematron/schematron-skeleton-api.htm +723 -0
  83. data/vendor/xspec-1.0.0/src/schematron/sch-location-compare.xsl +139 -0
  84. data/vendor/xspec-1.0.0/src/schematron/schut-to-xspec.xsl +179 -0
  85. data/vendor/xspec-1.0.0/test/Makefile +117 -0
  86. data/vendor/xspec-1.0.0/test/README +5 -0
  87. data/vendor/xspec-1.0.0/test/catalog/xspec-160_catalog.xml +4 -0
  88. data/vendor/xspec-1.0.0/test/catalog/xspec-160_schematron.xspec +6 -0
  89. data/vendor/xspec-1.0.0/test/catalog/xspec-160_xslt.xspec +5 -0
  90. data/vendor/xspec-1.0.0/test/end-to-end/README.md +42 -0
  91. data/vendor/xspec-1.0.0/test/end-to-end/cases/.gitignore +1 -0
  92. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/.gitignore +3 -0
  93. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-50-result-norm.html +74 -0
  94. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-55-result-norm.html +112 -0
  95. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-focus-1-result-norm.html +109 -0
  96. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-function-result-norm.html +118 -0
  97. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-import-result-norm.html +163 -0
  98. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-imported-result-norm.html +95 -0
  99. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-pending-result-norm.html +123 -0
  100. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-rule-result-norm.html +109 -0
  101. data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-three-dots-result-norm.html +1237 -0
  102. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-50.xsl +7 -0
  103. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-50.xspec +10 -0
  104. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-55.xsl +2 -0
  105. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-55.xspec +18 -0
  106. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-focus-1.xspec +71 -0
  107. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-function.xspec +50 -0
  108. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-import.xspec +50 -0
  109. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-imported.xspec +48 -0
  110. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-pending.xspec +89 -0
  111. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-rule.xspec +76 -0
  112. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-three-dots.xsl +49 -0
  113. data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-three-dots.xspec +527 -0
  114. data/vendor/xspec-1.0.0/test/end-to-end/generate-expected.cmd +51 -0
  115. data/vendor/xspec-1.0.0/test/end-to-end/generate-expected.sh +25 -0
  116. data/vendor/xspec-1.0.0/test/end-to-end/processor/_deserializer.xsl +53 -0
  117. data/vendor/xspec-1.0.0/test/end-to-end/processor/_normalizer.xsl +192 -0
  118. data/vendor/xspec-1.0.0/test/end-to-end/processor/_serializer.xsl +15 -0
  119. data/vendor/xspec-1.0.0/test/end-to-end/processor/_util.xsl +35 -0
  120. data/vendor/xspec-1.0.0/test/end-to-end/processor/compare.xsl +88 -0
  121. data/vendor/xspec-1.0.0/test/end-to-end/processor/normalize.xsl +28 -0
  122. data/vendor/xspec-1.0.0/test/end-to-end/run-e2e-tests.cmd +61 -0
  123. data/vendor/xspec-1.0.0/test/end-to-end/run-e2e-tests.sh +28 -0
  124. data/vendor/xspec-1.0.0/test/generate-tests-utils.xspec +636 -0
  125. data/vendor/xspec-1.0.0/test/generate-x-utils.xspec +173 -0
  126. data/vendor/xspec-1.0.0/test/generate-xspec-tests.xspec +64 -0
  127. data/vendor/xspec-1.0.0/test/run-xspec-tests.cmd +83 -0
  128. data/vendor/xspec-1.0.0/test/run-xspec-tests.sh +42 -0
  129. data/vendor/xspec-1.0.0/test/sch-location-compare.xspec +179 -0
  130. data/vendor/xspec-1.0.0/test/schematron/data/standards.xml +7 -0
  131. data/vendor/xspec-1.0.0/test/schematron/schematron-017.sch +9 -0
  132. data/vendor/xspec-1.0.0/test/schematron/schematron-018.sch +17 -0
  133. data/vendor/xspec-1.0.0/test/schematron/schematron-019.sch +13 -0
  134. data/vendor/xspec-1.0.0/test/schematron/schematron-020-01.sch +35 -0
  135. data/vendor/xspec-1.0.0/test/schematron/schematron-020.sch +32 -0
  136. data/vendor/xspec-1.0.0/test/schematron/schematron-021.sch +28 -0
  137. data/vendor/xspec-1.0.0/test/schematron/schematron-022.sch +18 -0
  138. data/vendor/xspec-1.0.0/test/schematron/schematron-xslt-compile.xsl +8 -0
  139. data/vendor/xspec-1.0.0/test/schematron/schematron-xslt-expand.xsl +8 -0
  140. data/vendor/xspec-1.0.0/test/schematron/schematron-xslt-include.xsl +8 -0
  141. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-001-in.xspec +5 -0
  142. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-001-out.xspec +7 -0
  143. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-002-in.xspec +5 -0
  144. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-002-out.xspec +7 -0
  145. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-002.sch +4 -0
  146. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-003-in.xspec +7 -0
  147. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-003-out.xspec +9 -0
  148. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-004-in.xspec +20 -0
  149. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-004-out.xspec +22 -0
  150. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-005-in.xspec +6 -0
  151. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-005-out.xspec +8 -0
  152. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-006-in.xspec +11 -0
  153. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-006-out.xspec +13 -0
  154. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-007-in.xspec +7 -0
  155. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-007-out.xspec +9 -0
  156. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-007.xml +2 -0
  157. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-008-in.xspec +9 -0
  158. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-008-out.xspec +9 -0
  159. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-009-import-in.xspec +5 -0
  160. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-009-in.xspec +6 -0
  161. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-009-out.xspec +10 -0
  162. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-010-import.xspec +5 -0
  163. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-010-in.xspec +6 -0
  164. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-010-out.xspec +8 -0
  165. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-011-in.xspec +6 -0
  166. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-011-out.xspec +8 -0
  167. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-012-01.xml +4 -0
  168. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-012-02.xml +13 -0
  169. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-012-out.xspec +81 -0
  170. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-013-in.xspec +6 -0
  171. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-013-out.xspec +8 -0
  172. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-test.sch +4 -0
  173. data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-test.sch.xsl +4 -0
  174. data/vendor/xspec-1.0.0/test/schematron-01.sch +17 -0
  175. data/vendor/xspec-1.0.0/test/schematron-01.xml +14 -0
  176. data/vendor/xspec-1.0.0/test/schematron-01.xspec +14 -0
  177. data/vendor/xspec-1.0.0/test/schematron-012.xspec +83 -0
  178. data/vendor/xspec-1.0.0/test/schematron-014-01.xml +10 -0
  179. data/vendor/xspec-1.0.0/test/schematron-014.sch +16 -0
  180. data/vendor/xspec-1.0.0/test/schematron-014.xspec +11 -0
  181. data/vendor/xspec-1.0.0/test/schematron-015.sch +16 -0
  182. data/vendor/xspec-1.0.0/test/schematron-015.xspec +11 -0
  183. data/vendor/xspec-1.0.0/test/schematron-016.sch +19 -0
  184. data/vendor/xspec-1.0.0/test/schematron-016.xspec +171 -0
  185. data/vendor/xspec-1.0.0/test/schematron-017.xspec +26 -0
  186. data/vendor/xspec-1.0.0/test/schematron-018.xspec +120 -0
  187. data/vendor/xspec-1.0.0/test/schematron-019.xspec +16 -0
  188. data/vendor/xspec-1.0.0/test/schematron-020.xspec +53 -0
  189. data/vendor/xspec-1.0.0/test/schematron-021.xspec +27 -0
  190. data/vendor/xspec-1.0.0/test/schematron-022.xspec +15 -0
  191. data/vendor/xspec-1.0.0/test/schematron-param-001.xspec +50 -0
  192. data/vendor/xspec-1.0.0/test/schut-to-xspec-012.sch +27 -0
  193. data/vendor/xspec-1.0.0/test/schut-to-xspec.xspec +85 -0
  194. data/vendor/xspec-1.0.0/test/unit-expect-xsl.xspec +28 -0
  195. data/vendor/xspec-1.0.0/test/xspec-26.xsl +19 -0
  196. data/vendor/xspec-1.0.0/test/xspec-26.xspec +17 -0
  197. data/vendor/xspec-1.0.0/test/xspec-30.xml +2 -0
  198. data/vendor/xspec-1.0.0/test/xspec-30.xsl +6 -0
  199. data/vendor/xspec-1.0.0/test/xspec-30.xspec +8 -0
  200. data/vendor/xspec-1.0.0/test/xspec-33.xsl +7 -0
  201. data/vendor/xspec-1.0.0/test/xspec-33.xspec +15 -0
  202. data/vendor/xspec-1.0.0/test/xspec-46.xsl +7 -0
  203. data/vendor/xspec-1.0.0/test/xspec-46.xspec +9 -0
  204. data/vendor/xspec-1.0.0/test/xspec-72.xsl +13 -0
  205. data/vendor/xspec-1.0.0/test/xspec-72.xspec +19 -0
  206. data/vendor/xspec-1.0.0/test/xspec-bat.cmd +757 -0
  207. data/vendor/xspec-1.0.0/test/xspec-focus-2.xspec +91 -0
  208. data/vendor/xspec-1.0.0/test/xspec-junit.xspec +78 -0
  209. data/vendor/xspec-1.0.0/test/xspec-result-naming-collision.xml +1003 -0
  210. data/vendor/xspec-1.0.0/test/xspec-result-naming-collision.xslt +10 -0
  211. data/vendor/xspec-1.0.0/test/xspec-result-naming-collision.xspec +13 -0
  212. data/vendor/xspec-1.0.0/test/xspec-tested.xql +44 -0
  213. data/vendor/xspec-1.0.0/test/xspec-tested.xsl +64 -0
  214. data/vendor/xspec-1.0.0/test/xspec-variable.xml +3 -0
  215. data/vendor/xspec-1.0.0/test/xspec-variable.xspec +58 -0
  216. data/vendor/xspec-1.0.0/test/xspec-xslt3.xsl +13 -0
  217. data/vendor/xspec-1.0.0/test/xspec-xslt3.xspec +12 -0
  218. data/vendor/xspec-1.0.0/test/xspec.bats +420 -0
  219. data/vendor/xspec-1.0.0/tutorial/escape-for-regex.xslt +40 -0
  220. data/vendor/xspec-1.0.0/tutorial/escape-for-regex.xspec +75 -0
  221. data/vendor/xspec-1.0.0/tutorial/schematron/demo-01.sch +17 -0
  222. data/vendor/xspec-1.0.0/tutorial/schematron/demo-01.xml +11 -0
  223. data/vendor/xspec-1.0.0/tutorial/schematron/demo-01.xspec +14 -0
  224. data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-PhaseA.xspec +11 -0
  225. data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-PhaseB.xspec +12 -0
  226. data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-import1.xspec +10 -0
  227. data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-import2.xspec +8 -0
  228. data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-import3.xspec +10 -0
  229. data/vendor/xspec-1.0.0/tutorial/schematron/demo-02.sch +58 -0
  230. data/vendor/xspec-1.0.0/tutorial/schematron/demo-02.xml +19 -0
  231. data/vendor/xspec-1.0.0/tutorial/schematron/demo-03-doc1.xml +6 -0
  232. data/vendor/xspec-1.0.0/tutorial/schematron/demo-03-doc2.xml +7 -0
  233. data/vendor/xspec-1.0.0/tutorial/schematron/demo-03.sch +29 -0
  234. data/vendor/xspec-1.0.0/tutorial/schematron/demo-03.xspec +63 -0
  235. data/vendor/xspec-1.0.0/tutorial/schematron/demo-04.sch +20 -0
  236. data/vendor/xspec-1.0.0/tutorial/schematron/demo-04.xspec +33 -0
  237. data/vendor/xspec-1.0.0/tutorial/schematron/quickfix.sch +81 -0
  238. data/vendor/xspec-1.0.0/tutorial/xquery-tutorial.xq +8 -0
  239. data/vendor/xspec-1.0.0/tutorial/xquery-tutorial.xspec +16 -0
  240. data/vendor/xspec-1.0.0/xproject/project.xml +8 -0
  241. data/vendor/xspec-1.0.0/xproject/release-project.xsl +41 -0
  242. metadata +341 -0
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet exclude-result-prefixes="#all" version="2.0"
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
+ <xsl:template as="xs:anyAtomicType" match="foo">
5
+ <xsl:sequence select="data(.)" />
6
+ </xsl:template>
7
+ </xsl:stylesheet>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <x:description stylesheet="xspec-50.xsl" xmlns:x="http://www.jenitennison.com/xslt/xspec">
3
+ <x:scenario label="Expecting xs:hexBinary('0123') when $x:result is xs:untypedAtomic('0123')">
4
+ <x:context><foo>0123</foo></x:context>
5
+ <x:expect select="xs:hexBinary('0123')">
6
+ <x:label>must generate a failure report HTML which reads [Result] =
7
+ "xs:untypedAtomic('0123')" and [Expected Result] = "xs:hexBinary('0123')"</x:label>
8
+ </x:expect>
9
+ </x:scenario>
10
+ </x:description>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <x:description stylesheet="xspec-55.xsl" xmlns:x="http://www.jenitennison.com/xslt/xspec">
3
+ <x:scenario label="In a failure report HTML">
4
+ <x:context />
5
+ <x:expect select="xs:decimal(1)">
6
+ <x:label>[Expected Result] must represent xs:decimal(1) by "1.0" (numeric literal of
7
+ decimal)</x:label>
8
+ </x:expect>
9
+ <x:expect select="xs:double(1)">
10
+ <x:label>[Expected Result] must represent xs:double(1) by "xs:double('1')" (constructor
11
+ of double)</x:label>
12
+ </x:expect>
13
+ <x:expect select="xs:integer(1)">
14
+ <x:label>[Expected Result] must represent xs:integer(1) by "1" (numeric literal of
15
+ integer)</x:label>
16
+ </x:expect>
17
+ </x:scenario>
18
+ </x:description>
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ===================================================================== -->
3
+ <!-- File: test/xspec-pending.xspec -->
4
+ <!-- Author: Florent Georges -->
5
+ <!-- Tags: -->
6
+ <!-- Copyright (c) 2010 Jeni Tennsion (see end of file.) -->
7
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
8
+ <t:description xmlns:t="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://example.org/ns/my" query="http://example.org/ns/my" query-at="../../xspec-tested.xql" stylesheet="../../xspec-tested.xsl">
9
+ <!--
10
+ Test @focus.
11
+ -->
12
+
13
+ <!--
14
+ Normal scenarios (must be pending because of the @focus in "Focused on scenarios").
15
+ -->
16
+ <t:scenario label="an unfocused correct scenario must be Pending">
17
+ <t:call function="my:square">
18
+ <t:param select="3"/>
19
+ </t:call>
20
+ <t:expect label="it would return Success if it were not Pending" test="$x:result eq 9"/>
21
+ </t:scenario>
22
+ <t:scenario label="an unfocused incorrect scenario must be Pending">
23
+ <t:call function="my:square">
24
+ <t:param select="2"/>
25
+ </t:call>
26
+ <t:expect label="it would return Failure if it were not Pending" test="$x:result instance of xs:string"/>
27
+ </t:scenario>
28
+
29
+ <!--
30
+ Focused on scenarios.
31
+ -->
32
+ <t:scenario label="a focused correct scenario" focus="testing @focus">
33
+ <t:call function="my:square">
34
+ <t:param select="3"/>
35
+ </t:call>
36
+ <t:expect label="must execute the test and return Success" test="$x:result eq 9"/>
37
+ </t:scenario>
38
+ <t:scenario label="a focused incorrect scenario" focus="testing @focus">
39
+ <t:call function="my:square">
40
+ <t:param select="2"/>
41
+ </t:call>
42
+ <t:expect label="must execute the test and return Failure" test="$x:result instance of xs:string"/>
43
+ </t:scenario>
44
+ </t:description>
45
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
46
+ <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
47
+ <!-- -->
48
+ <!-- Copyright (c) 2010 Jeni Tennsion -->
49
+ <!-- -->
50
+ <!-- The contents of this file are subject to the MIT License (see the URI -->
51
+ <!-- http://www.opensource.org/licenses/mit-license.php for details). -->
52
+ <!-- -->
53
+ <!-- Permission is hereby granted, free of charge, to any person obtaining -->
54
+ <!-- a copy of this software and associated documentation files (the -->
55
+ <!-- "Software"), to deal in the Software without restriction, including -->
56
+ <!-- without limitation the rights to use, copy, modify, merge, publish, -->
57
+ <!-- distribute, sublicense, and/or sell copies of the Software, and to -->
58
+ <!-- permit persons to whom the Software is furnished to do so, subject to -->
59
+ <!-- the following conditions: -->
60
+ <!-- -->
61
+ <!-- The above copyright notice and this permission notice shall be -->
62
+ <!-- included in all copies or substantial portions of the Software. -->
63
+ <!-- -->
64
+ <!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -->
65
+ <!-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
66
+ <!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.-->
67
+ <!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -->
68
+ <!-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -->
69
+ <!-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -->
70
+ <!-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
71
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -0,0 +1,50 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ===================================================================== -->
3
+ <!-- File: test/xspec-function.xspec -->
4
+ <!-- Author: Florent Georges -->
5
+ <!-- Tags: -->
6
+ <!-- Copyright (c) 2010 Jeni Tennsion (see end of file.) -->
7
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
8
+ <t:description xmlns:t="http://www.jenitennison.com/xslt/xspec" xmlns:my="http://example.org/ns/my" query="http://example.org/ns/my" query-at="../../xspec-tested.xql" stylesheet="../../xspec-tested.xsl">
9
+ <t:scenario label="when calling a function and expecting correctly">
10
+ <t:call function="my:square">
11
+ <t:param select="3"/>
12
+ </t:call>
13
+ <t:expect label="expecting the correct value must return Success" test="$x:result eq 9"/>
14
+ <t:expect label="expecting the correct type must return Success" test="$x:result instance of xs:integer"/>
15
+ </t:scenario>
16
+ <t:scenario label="when calling a function and expecting incorrectly">
17
+ <t:call function="my:square">
18
+ <t:param select="2"/>
19
+ </t:call>
20
+ <t:expect label="expecting an incorrect value must return Failure" test="$x:result eq 42"/>
21
+ <t:expect label="expecting an incorrect type must return Failure" test="$x:result instance of xs:string"/>
22
+ </t:scenario>
23
+ </t:description>
24
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
25
+ <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
26
+ <!-- -->
27
+ <!-- Copyright (c) 2010 Jeni Tennsion -->
28
+ <!-- -->
29
+ <!-- The contents of this file are subject to the MIT License (see the URI -->
30
+ <!-- http://www.opensource.org/licenses/mit-license.php for details). -->
31
+ <!-- -->
32
+ <!-- Permission is hereby granted, free of charge, to any person obtaining -->
33
+ <!-- a copy of this software and associated documentation files (the -->
34
+ <!-- "Software"), to deal in the Software without restriction, including -->
35
+ <!-- without limitation the rights to use, copy, modify, merge, publish, -->
36
+ <!-- distribute, sublicense, and/or sell copies of the Software, and to -->
37
+ <!-- permit persons to whom the Software is furnished to do so, subject to -->
38
+ <!-- the following conditions: -->
39
+ <!-- -->
40
+ <!-- The above copyright notice and this permission notice shall be -->
41
+ <!-- included in all copies or substantial portions of the Software. -->
42
+ <!-- -->
43
+ <!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -->
44
+ <!-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
45
+ <!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.-->
46
+ <!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -->
47
+ <!-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -->
48
+ <!-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -->
49
+ <!-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
50
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -0,0 +1,50 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ===================================================================== -->
3
+ <!-- File: test/xspec-import.xspec -->
4
+ <!-- Author: Florent Georges -->
5
+ <!-- Tags: -->
6
+ <!-- Copyright (c) 2010 Jeni Tennsion (see end of file.) -->
7
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
8
+ <t:description xmlns:t="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://example.org/ns/my" query="http://example.org/ns/my" query-at="../../xspec-tested.xql" stylesheet="../../xspec-tested.xsl">
9
+ <t:import href="xspec-imported.xspec"/>
10
+ <t:scenario label="when testing a correct scenario in an importing file">
11
+ <t:call function="my:square">
12
+ <t:param select="3"/>
13
+ </t:call>
14
+ <t:expect label="expecting the correct result must return Success" test="$x:result eq 9"/>
15
+ <t:expect label="expecting the correct type must return Success" test="$x:result instance of xs:integer"/>
16
+ </t:scenario>
17
+ <t:scenario label="when testing an incorrect scenario in an importing file">
18
+ <t:call function="my:square">
19
+ <t:param select="2"/>
20
+ </t:call>
21
+ <t:expect label="it must return Failure" test="$x:result instance of xs:string"/>
22
+ </t:scenario>
23
+ </t:description>
24
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
25
+ <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
26
+ <!-- -->
27
+ <!-- Copyright (c) 2010 Jeni Tennsion -->
28
+ <!-- -->
29
+ <!-- The contents of this file are subject to the MIT License (see the URI -->
30
+ <!-- http://www.opensource.org/licenses/mit-license.php for details). -->
31
+ <!-- -->
32
+ <!-- Permission is hereby granted, free of charge, to any person obtaining -->
33
+ <!-- a copy of this software and associated documentation files (the -->
34
+ <!-- "Software"), to deal in the Software without restriction, including -->
35
+ <!-- without limitation the rights to use, copy, modify, merge, publish, -->
36
+ <!-- distribute, sublicense, and/or sell copies of the Software, and to -->
37
+ <!-- permit persons to whom the Software is furnished to do so, subject to -->
38
+ <!-- the following conditions: -->
39
+ <!-- -->
40
+ <!-- The above copyright notice and this permission notice shall be -->
41
+ <!-- included in all copies or substantial portions of the Software. -->
42
+ <!-- -->
43
+ <!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -->
44
+ <!-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
45
+ <!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.-->
46
+ <!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -->
47
+ <!-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -->
48
+ <!-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -->
49
+ <!-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
50
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -0,0 +1,48 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ===================================================================== -->
3
+ <!-- File: test/xspec-imported.xspec -->
4
+ <!-- Author: Florent Georges -->
5
+ <!-- Tags: -->
6
+ <!-- Copyright (c) 2010 Jeni Tennsion (see end of file.) -->
7
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
8
+ <t:description xmlns:t="http://www.jenitennison.com/xslt/xspec" xmlns:my="http://example.org/ns/my" query="http://example.org/ns/my" query-at="../../xspec-tested.xql" stylesheet="../../xspec-tested.xsl">
9
+ <t:scenario label="a correct scenario in an imported file">
10
+ <t:call function="my:square">
11
+ <t:param select="3"/>
12
+ </t:call>
13
+ <t:expect label="must return Success" test="$x:result eq 9"/>
14
+ </t:scenario>
15
+ <t:scenario label="an incorrect scenario in an imported file">
16
+ <t:call function="my:square">
17
+ <t:param select="2"/>
18
+ </t:call>
19
+ <t:expect label="must return Failure" test="$x:result eq 42"/>
20
+ </t:scenario>
21
+ </t:description>
22
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
23
+ <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
24
+ <!-- -->
25
+ <!-- Copyright (c) 2010 Jeni Tennsion -->
26
+ <!-- -->
27
+ <!-- The contents of this file are subject to the MIT License (see the URI -->
28
+ <!-- http://www.opensource.org/licenses/mit-license.php for details). -->
29
+ <!-- -->
30
+ <!-- Permission is hereby granted, free of charge, to any person obtaining -->
31
+ <!-- a copy of this software and associated documentation files (the -->
32
+ <!-- "Software"), to deal in the Software without restriction, including -->
33
+ <!-- without limitation the rights to use, copy, modify, merge, publish, -->
34
+ <!-- distribute, sublicense, and/or sell copies of the Software, and to -->
35
+ <!-- permit persons to whom the Software is furnished to do so, subject to -->
36
+ <!-- the following conditions: -->
37
+ <!-- -->
38
+ <!-- The above copyright notice and this permission notice shall be -->
39
+ <!-- included in all copies or substantial portions of the Software. -->
40
+ <!-- -->
41
+ <!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -->
42
+ <!-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
43
+ <!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.-->
44
+ <!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -->
45
+ <!-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -->
46
+ <!-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -->
47
+ <!-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
48
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -0,0 +1,89 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ===================================================================== -->
3
+ <!-- File: test/xspec-pending.xspec -->
4
+ <!-- Author: Florent Georges -->
5
+ <!-- Tags: -->
6
+ <!-- Copyright (c) 2010 Jeni Tennsion (see end of file.) -->
7
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
8
+ <t:description xmlns:t="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://example.org/ns/my" query="http://example.org/ns/my" query-at="../../xspec-tested.xql" stylesheet="../../xspec-tested.xsl">
9
+ <!--
10
+ Test pending features (x:pending and @pending).
11
+ -->
12
+
13
+ <!--
14
+ Test x:pending.
15
+ -->
16
+ <t:pending label="testing x:pending">
17
+ <t:scenario label="a correct scenario in x:pending must be Pending">
18
+ <t:call function="my:square">
19
+ <t:param select="3"/>
20
+ </t:call>
21
+ <t:expect label="it would return Success if it were not Pending" test="$x:result eq 9"/>
22
+ </t:scenario>
23
+ <t:scenario label="an incorrect scenario in x:pending must be Pending">
24
+ <t:call function="my:square">
25
+ <t:param select="2"/>
26
+ </t:call>
27
+ <t:expect label="it would return Failure if it were not Pending" test="$x:result instance of xs:string"/>
28
+ </t:scenario>
29
+ </t:pending>
30
+
31
+ <!--
32
+ Non-pending scenarios.
33
+ -->
34
+ <t:scenario label="a non-pending correct scenario alongside a pending scenario">
35
+ <t:call function="my:square">
36
+ <t:param select="3"/>
37
+ </t:call>
38
+ <t:expect label="must execute the test and return Success" test="$x:result eq 9"/>
39
+ </t:scenario>
40
+ <t:scenario label="a non-pending incorrect scenario alongside a pending scenario">
41
+ <t:call function="my:square">
42
+ <t:param select="2"/>
43
+ </t:call>
44
+ <t:expect label="must execute the test and return Failure" test="$x:result instance of xs:string"/>
45
+ </t:scenario>
46
+
47
+ <!--
48
+ Test @pending.
49
+ -->
50
+ <t:scenario label="a correct scenario with @pending must be Pending" pending="testing @pending">
51
+ <t:call function="my:square">
52
+ <t:param select="3"/>
53
+ </t:call>
54
+ <t:expect label="it would return Success if it were not Pending" test="$x:result eq 9"/>
55
+ </t:scenario>
56
+ <t:scenario label="an incorrect scenario with @pending must be Pending" pending="testing @pending">
57
+ <t:call function="my:square">
58
+ <t:param select="2"/>
59
+ </t:call>
60
+ <t:expect label="it would return Failure if it were not Pending" test="$x:result instance of xs:string"/>
61
+ </t:scenario>
62
+ </t:description>
63
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
64
+ <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
65
+ <!-- -->
66
+ <!-- Copyright (c) 2010 Jeni Tennsion -->
67
+ <!-- -->
68
+ <!-- The contents of this file are subject to the MIT License (see the URI -->
69
+ <!-- http://www.opensource.org/licenses/mit-license.php for details). -->
70
+ <!-- -->
71
+ <!-- Permission is hereby granted, free of charge, to any person obtaining -->
72
+ <!-- a copy of this software and associated documentation files (the -->
73
+ <!-- "Software"), to deal in the Software without restriction, including -->
74
+ <!-- without limitation the rights to use, copy, modify, merge, publish, -->
75
+ <!-- distribute, sublicense, and/or sell copies of the Software, and to -->
76
+ <!-- permit persons to whom the Software is furnished to do so, subject to -->
77
+ <!-- the following conditions: -->
78
+ <!-- -->
79
+ <!-- The above copyright notice and this permission notice shall be -->
80
+ <!-- included in all copies or substantial portions of the Software. -->
81
+ <!-- -->
82
+ <!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -->
83
+ <!-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
84
+ <!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.-->
85
+ <!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -->
86
+ <!-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -->
87
+ <!-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -->
88
+ <!-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
89
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -0,0 +1,76 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ===================================================================== -->
3
+ <!-- File: test/xspec-rule.xspec -->
4
+ <!-- Author: Florent Georges -->
5
+ <!-- Tags: -->
6
+ <!-- Copyright (c) 2010 Jeni Tennsion (see end of file.) -->
7
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
8
+ <t:description xmlns:t="http://www.jenitennison.com/xslt/xspec" stylesheet="../../xspec-tested.xsl">
9
+ <t:scenario label="x:context with correct x:expect">
10
+ <t:context>
11
+ <rule/>
12
+ </t:context>
13
+ <t:expect label="must return Success">
14
+ <transformed/>
15
+ </t:expect>
16
+ </t:scenario>
17
+ <t:scenario label="x:context with incorrect x:expect">
18
+ <t:context>
19
+ <rule/>
20
+ </t:context>
21
+ <t:expect label="must return Failure">
22
+ <erroneous/>
23
+ </t:expect>
24
+ </t:scenario>
25
+
26
+ <!-- TODO: Make two different cases for the base t:apply and with param. -->
27
+ <t:scenario label="x:apply with correct x:expect" pending="not implemented yet">
28
+ <t:variable name="ctxt" as="element()">
29
+ <rule/>
30
+ </t:variable>
31
+ <t:apply select="$ctxt">
32
+ <t:param name="p" select="0"/>
33
+ </t:apply>
34
+ <t:expect label="must return Success">
35
+ <transformed/>
36
+ </t:expect>
37
+ </t:scenario>
38
+ <t:scenario label="x:apply with incorrect x:expect" pending="not implemented yet">
39
+ <t:variable name="ctxt" as="element()">
40
+ <rule/>
41
+ </t:variable>
42
+ <t:apply select="$ctxt">
43
+ <t:param name="p" select="0"/>
44
+ </t:apply>
45
+ <t:expect label="must return Failure">
46
+ <erroneous/>
47
+ </t:expect>
48
+ </t:scenario>
49
+ </t:description>
50
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
51
+ <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
52
+ <!-- -->
53
+ <!-- Copyright (c) 2010 Jeni Tennsion -->
54
+ <!-- -->
55
+ <!-- The contents of this file are subject to the MIT License (see the URI -->
56
+ <!-- http://www.opensource.org/licenses/mit-license.php for details). -->
57
+ <!-- -->
58
+ <!-- Permission is hereby granted, free of charge, to any person obtaining -->
59
+ <!-- a copy of this software and associated documentation files (the -->
60
+ <!-- "Software"), to deal in the Software without restriction, including -->
61
+ <!-- without limitation the rights to use, copy, modify, merge, publish, -->
62
+ <!-- distribute, sublicense, and/or sell copies of the Software, and to -->
63
+ <!-- permit persons to whom the Software is furnished to do so, subject to -->
64
+ <!-- the following conditions: -->
65
+ <!-- -->
66
+ <!-- The above copyright notice and this permission notice shall be -->
67
+ <!-- included in all copies or substantial portions of the Software. -->
68
+ <!-- -->
69
+ <!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -->
70
+ <!-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
71
+ <!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.-->
72
+ <!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -->
73
+ <!-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -->
74
+ <!-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -->
75
+ <!-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
76
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -0,0 +1,49 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet exclude-result-prefixes="#all" version="2.0"
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
+ <xsl:template as="node()" match="document-node() | attribute() | node()">
5
+ <xsl:sequence select="." />
6
+ </xsl:template>
7
+
8
+ <!--
9
+ Document node
10
+ -->
11
+ <xsl:variable as="document-node()" name="document-node_multiple-nodes">
12
+ <xsl:document>
13
+ <?pi?>
14
+ <!--comment-->
15
+ <elem />
16
+ </xsl:document>
17
+ </xsl:variable>
18
+
19
+ <xsl:variable as="document-node()" name="document-node_empty">
20
+ <xsl:document />
21
+ </xsl:variable>
22
+
23
+ <xsl:variable as="document-node()" name="document-node_three-dots">
24
+ <xsl:document>...</xsl:document>
25
+ </xsl:variable>
26
+
27
+ <xsl:variable as="document-node()" name="document-node_text">
28
+ <xsl:document>text</xsl:document>
29
+ </xsl:variable>
30
+
31
+ <!--
32
+ Text node
33
+ -->
34
+ <xsl:variable as="text()" name="text-node_usual">
35
+ <xsl:text>text</xsl:text>
36
+ </xsl:variable>
37
+
38
+ <xsl:variable as="text()" name="text-node_whitespace-only">
39
+ <xsl:text>&#x09;&#x0A;&#x0D;&#x20;</xsl:text>
40
+ </xsl:variable>
41
+
42
+ <xsl:variable as="text()" name="text-node_zero-length">
43
+ <xsl:text />
44
+ </xsl:variable>
45
+
46
+ <xsl:variable as="text()" name="text-node_three-dots">
47
+ <xsl:text>...</xsl:text>
48
+ </xsl:variable>
49
+ </xsl:stylesheet>