simple-xspec-wrapper 0.1.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,614 @@
1
+ <?xml version="1.0" ?>
2
+ <!--
3
+ ISO_SVRL.xsl
4
+
5
+ Implementation of Schematron Validation Report Language from ISO Schematron
6
+ ISO/IEC 19757 Document Schema Definition Languages (DSDL)
7
+ Part 3: Rule-based validation Schematron
8
+ Annex D: Schematron Validation Report Language
9
+
10
+ This ISO Standard is available free as a Publicly Available Specification in PDF from ISO.
11
+ Also see www.schematron.com for drafts and other information.
12
+
13
+ This implementation of SVRL is designed to run with the "Skeleton" implementation
14
+ of Schematron which Oliver Becker devised. The skeleton code provides a
15
+ Schematron implementation but with named templates for handling all output;
16
+ the skeleton provides basic templates for output using this API, but client
17
+ validators can be written to import the skeleton and override the default output
18
+ templates as required. (In order to understand this, you must understand that
19
+ a named template such as "process-assert" in this XSLT stylesheet overrides and
20
+ replaces any template with the same name in the imported skeleton XSLT file.)
21
+
22
+ The other important thing to understand in this code is that there are different
23
+ versions of the Schematron skeleton. These track the development of Schematron through
24
+ Schematron 1.5, Schematron 1.6 and now ISO Schematron. One only skeleton must be
25
+ imported. The code has templates for the different skeletons commented out for
26
+ convenience. ISO Schematron has a different namespace than Schematron 1.5 and 1.6;
27
+ so the ISO Schematron skeleton has been written itself with an optional import
28
+ statement to in turn import the Schematron 1.6 skeleton. This will allow you to
29
+ validate with schemas from either namespace.
30
+
31
+
32
+ History:
33
+ 2010-07-10
34
+ * MIT license
35
+ 2010-04-14
36
+ * Add command line parameter 'terminate' which will terminate on first failed
37
+ assert and (optionally) successful report.
38
+ 2009-03-18
39
+ * Fix atrribute with space "see " which generates wrong name in some processors
40
+ 2008-08-11
41
+ * RJ Fix attribute/@select which saxon allows in XSLT 1
42
+ 2008-08-07
43
+ * RJ Add output-encoding attribute to specify final encoding to use
44
+ * Alter allow-foreign functionality so that Schematron span, emph and dir elements make
45
+ it to the output, for better formatting and because span can be used to mark up
46
+ semantically interesting information embedded in diagnostics, which reduces the
47
+ need to extend SVRL itself
48
+ * Diagnostic-reference had an invalid attribute @id that duplicated @diagnostic: removed
49
+ 2008-08-06
50
+ * RJ Fix invalid output: svrl:diagnostic-reference is not contained in an svrl:text
51
+ * Output comment to SVRL file giving filename if available (from command-line parameter)
52
+ 2008-08-04
53
+ * RJ move sch: prefix to schold: prefix to prevent confusion (we want people to
54
+ be able to switch from old namespace to new namespace without changing the
55
+ sch: prefix, so it is better to keep that prefix completely out of the XSLT)
56
+ * Extra signature fixes (PH)
57
+ 2008-08-03
58
+ * Repair missing class parameter on process-p
59
+ 2008-07-31
60
+ * Update skeleton names
61
+ 2007-04-03
62
+ * Add option generate-fired-rule (RG)
63
+ 2007-02-07
64
+ * Prefer true|false for parameters. But allow yes|no on some old for compatability
65
+ * DP Diagnostics output to svrl:text. Diagnosis put out after assertion text.
66
+ * Removed non-SVRL elements and attributes: better handled as an extra layer that invokes this one
67
+ * Add more formal parameters
68
+ * Correct confusion between $schemaVersion and $queryBinding
69
+ * Indent
70
+ * Validate against RNC schemas for XSLT 1 and 2 (with regex tests removed)
71
+ * Validate output with UniversalTest.sch against RNC schema for ISO SVRL
72
+
73
+ 2007-02-01
74
+ * DP. Update formal parameters of overriding named templates to handle more attributes.
75
+ * DP. Refactor handling of rich and linkable parameters to a named template.
76
+
77
+ 2007-01-22
78
+ * DP change svrl:ns to svrl:ns-in-attribute-value
79
+ * Change default when no queryBinding from "unknown" to "xslt"
80
+
81
+ 2007-01-18:
82
+ * Improve documentation
83
+ * KH Add command-line options to generate paths or not
84
+ * Use axsl:attribute rather than xsl:attribute to shut XSLT2 up
85
+ * Add extra command-line options to pass to the iso_schematron_skeleton
86
+
87
+ 2006-12-01: iso_svrl.xsl Rick Jelliffe,
88
+ * update namespace,
89
+ * update phase handling,
90
+ * add flag param to process-assert and process-report & @ flag on output
91
+
92
+ 2001: Conformance1-5.xsl Rick Jelliffe,
93
+ * Created, using the skeleton code contributed by Oliver Becker
94
+ -->
95
+ <!--
96
+ Open Source Initiative OSI - The MIT License:Licensing
97
+ [OSI Approved License]
98
+
99
+ This source code was previously available under the zlib/libpng license.
100
+ Attribution is polite.
101
+
102
+ The MIT License
103
+
104
+ Copyright (c) 2004-2010 Rick Jellife and Academia Sinica Computing Centre, Taiwan
105
+
106
+ Permission is hereby granted, free of charge, to any person obtaining a copy
107
+ of this software and associated documentation files (the "Software"), to deal
108
+ in the Software without restriction, including without limitation the rights
109
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
110
+ copies of the Software, and to permit persons to whom the Software is
111
+ furnished to do so, subject to the following conditions:
112
+
113
+ The above copyright notice and this permission notice shall be included in
114
+ all copies or substantial portions of the Software.
115
+
116
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
122
+ THE SOFTWARE.
123
+ -->
124
+
125
+
126
+ <!-- Ideas nabbed from schematrons by Francis N., Miloslav N. and David C. -->
127
+
128
+ <!-- The command-line parameters are:
129
+ phase NMTOKEN | "#ALL" (default) Select the phase for validation
130
+ allow-foreign "true" | "false" (default) Pass non-Schematron elements and rich markup to the generated stylesheet
131
+ diagnose= true | false|yes|no Add the diagnostics to the assertion test in reports (yes|no are obsolete)
132
+ generate-paths=true|false|yes|no generate the @location attribute with XPaths (yes|no are obsolete)
133
+ sch.exslt.imports semi-colon delimited string of filenames for some EXSLT implementations
134
+ optimize "visit-no-attributes" Use only when the schema has no attributes as the context nodes
135
+ generate-fired-rule "true"(default) | "false" Generate fired-rule elements
136
+ terminate= yes | no | true | false | assert Terminate on the first failed assertion or successful report
137
+ Note: whether any output at all is generated depends on the XSLT implementation.
138
+ -->
139
+
140
+ <xsl:stylesheet
141
+ version="1.0"
142
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
143
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
144
+ xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
145
+ xmlns:schold="http://www.ascc.net/xml/schematron"
146
+ xmlns:iso="http://purl.oclc.org/dsdl/schematron"
147
+ xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
148
+ >
149
+
150
+ <!-- Select the import statement and adjust the path as
151
+ necessary for your system.
152
+ If not XSLT2 then also remove svrl:active-pattern/@document="{document-uri()}" from process-pattern()
153
+ -->
154
+ <!--
155
+ <xsl:import href="iso_schematron_skeleton_for_saxon.xsl"/>
156
+ -->
157
+
158
+ <xsl:import href="iso_schematron_skeleton_for_xslt1.xsl"/>
159
+ <!--
160
+ <xsl:import href="iso_schematron_skeleton.xsl"/>
161
+ <xsl:import href="skeleton1-5.xsl"/>
162
+ <xsl:import href="skeleton1-6.xsl"/>
163
+ -->
164
+
165
+ <xsl:param name="diagnose" >true</xsl:param>
166
+ <xsl:param name="phase" >
167
+ <xsl:choose>
168
+ <!-- Handle Schematron 1.5 and 1.6 phases -->
169
+ <xsl:when test="//schold:schema/@defaultPhase">
170
+ <xsl:value-of select="//schold:schema/@defaultPhase"/>
171
+ </xsl:when>
172
+ <!-- Handle ISO Schematron phases -->
173
+ <xsl:when test="//iso:schema/@defaultPhase">
174
+ <xsl:value-of select="//iso:schema/@defaultPhase"/>
175
+ </xsl:when>
176
+ <xsl:otherwise>#ALL</xsl:otherwise>
177
+ </xsl:choose>
178
+ </xsl:param>
179
+ <xsl:param name="allow-foreign" >false</xsl:param>
180
+ <xsl:param name="generate-paths" >true</xsl:param>
181
+ <xsl:param name="generate-fired-rule" >true</xsl:param>
182
+ <xsl:param name="optimize"/>
183
+
184
+ <xsl:param name="output-encoding" ></xsl:param>
185
+
186
+ <!-- e.g. saxon file.xml file.xsl "sch.exslt.imports=.../string.xsl;.../math.xsl" -->
187
+ <xsl:param name="sch.exslt.imports" />
188
+
189
+
190
+
191
+ <!-- Experimental: If this file called, then must be generating svrl -->
192
+ <xsl:variable name="svrlTest" select="true()" />
193
+
194
+
195
+
196
+ <!-- ================================================================ -->
197
+
198
+ <xsl:template name="process-prolog">
199
+ <axsl:output method="xml" omit-xml-declaration="no" standalone="yes"
200
+ indent="yes">
201
+ <xsl:if test=" string-length($output-encoding) &gt; 0">
202
+ <xsl:attribute name="encoding"><xsl:value-of select=" $output-encoding" /></xsl:attribute>
203
+ </xsl:if>
204
+ </axsl:output>
205
+
206
+ </xsl:template>
207
+
208
+ <!-- Overrides skeleton.xsl -->
209
+ <xsl:template name="process-root">
210
+ <xsl:param name="title"/>
211
+ <xsl:param name="contents" />
212
+ <xsl:param name="queryBinding" >xslt1</xsl:param>
213
+ <xsl:param name="schemaVersion" />
214
+ <xsl:param name="id" />
215
+ <xsl:param name="version"/>
216
+ <!-- "Rich" parameters -->
217
+ <xsl:param name="fpi" />
218
+ <xsl:param name="icon" />
219
+ <xsl:param name="lang" />
220
+ <xsl:param name="see" />
221
+ <xsl:param name="space" />
222
+
223
+ <svrl:schematron-output title="{$title}" schemaVersion="{$schemaVersion}" >
224
+ <xsl:if test=" string-length( normalize-space( $phase )) &gt; 0 and
225
+ not( normalize-space( $phase ) = '#ALL') ">
226
+ <axsl:attribute name="phase">
227
+ <xsl:value-of select=" $phase " />
228
+ </axsl:attribute>
229
+ </xsl:if>
230
+ <xsl:if test=" $allow-foreign = 'true'">
231
+ </xsl:if>
232
+ <xsl:if test=" $allow-foreign = 'true'">
233
+
234
+ <xsl:call-template name='richParms'>
235
+ <xsl:with-param name="fpi" select="$fpi" />
236
+ <xsl:with-param name="icon" select="$icon"/>
237
+ <xsl:with-param name="lang" select="$lang"/>
238
+ <xsl:with-param name="see" select="$see" />
239
+ <xsl:with-param name="space" select="$space" />
240
+ </xsl:call-template>
241
+ </xsl:if>
242
+
243
+ <axsl:comment><axsl:value-of select="$archiveDirParameter"/> &#xA0;
244
+ <axsl:value-of select="$archiveNameParameter"/> &#xA0;
245
+ <axsl:value-of select="$fileNameParameter"/> &#xA0;
246
+ <axsl:value-of select="$fileDirParameter"/></axsl:comment>
247
+
248
+
249
+ <xsl:apply-templates mode="do-schema-p" />
250
+ <xsl:copy-of select="$contents" />
251
+ </svrl:schematron-output>
252
+ </xsl:template>
253
+
254
+
255
+ <xsl:template name="process-assert">
256
+ <xsl:param name="test"/>
257
+ <xsl:param name="diagnostics" />
258
+ <xsl:param name="id" />
259
+ <xsl:param name="flag" />
260
+ <!-- "Linkable" parameters -->
261
+ <xsl:param name="role"/>
262
+ <xsl:param name="subject"/>
263
+ <!-- "Rich" parameters -->
264
+ <xsl:param name="fpi" />
265
+ <xsl:param name="icon" />
266
+ <xsl:param name="lang" />
267
+ <xsl:param name="see" />
268
+ <xsl:param name="space" />
269
+ <svrl:failed-assert test="{$test}" >
270
+ <xsl:if test="string-length( $id ) &gt; 0">
271
+ <axsl:attribute name="id">
272
+ <xsl:value-of select=" $id " />
273
+ </axsl:attribute>
274
+ </xsl:if>
275
+ <xsl:if test=" string-length( $flag ) &gt; 0">
276
+ <axsl:attribute name="flag">
277
+ <xsl:value-of select=" $flag " />
278
+ </axsl:attribute>
279
+ </xsl:if>
280
+ <!-- Process rich attributes. -->
281
+ <xsl:call-template name="richParms">
282
+ <xsl:with-param name="fpi" select="$fpi"/>
283
+ <xsl:with-param name="icon" select="$icon"/>
284
+ <xsl:with-param name="lang" select="$lang"/>
285
+ <xsl:with-param name="see" select="$see" />
286
+ <xsl:with-param name="space" select="$space" />
287
+ </xsl:call-template>
288
+ <xsl:call-template name='linkableParms'>
289
+ <xsl:with-param name="role" select="$role" />
290
+ <xsl:with-param name="subject" select="$subject"/>
291
+ </xsl:call-template>
292
+ <xsl:if test=" $generate-paths = 'true' or $generate-paths= 'yes' ">
293
+ <!-- true/false is the new way -->
294
+ <axsl:attribute name="location">
295
+ <axsl:apply-templates select="." mode="schematron-get-full-path"/>
296
+ </axsl:attribute>
297
+ </xsl:if>
298
+
299
+ <svrl:text>
300
+ <xsl:apply-templates mode="text" />
301
+
302
+ </svrl:text>
303
+ <xsl:if test="$diagnose = 'yes' or $diagnose= 'true' ">
304
+ <!-- true/false is the new way -->
305
+ <xsl:call-template name="diagnosticsSplit">
306
+ <xsl:with-param name="str" select="$diagnostics"/>
307
+ </xsl:call-template>
308
+ </xsl:if>
309
+ </svrl:failed-assert>
310
+
311
+
312
+ <xsl:if test=" $terminate = 'yes' or $terminate = 'true' ">
313
+ <axsl:message terminate="yes">TERMINATING</axsl:message>
314
+ </xsl:if>
315
+ <xsl:if test=" $terminate = 'assert' ">
316
+ <axsl:message terminate="yes">TERMINATING</axsl:message>
317
+ </xsl:if>
318
+ </xsl:template>
319
+
320
+ <xsl:template name="process-report">
321
+ <xsl:param name="id"/>
322
+ <xsl:param name="test"/>
323
+ <xsl:param name="diagnostics"/>
324
+ <xsl:param name="flag" />
325
+ <!-- "Linkable" parameters -->
326
+ <xsl:param name="role"/>
327
+ <xsl:param name="subject"/>
328
+ <!-- "Rich" parameters -->
329
+ <xsl:param name="fpi" />
330
+ <xsl:param name="icon" />
331
+ <xsl:param name="lang" />
332
+ <xsl:param name="see" />
333
+ <xsl:param name="space" />
334
+ <svrl:successful-report test="{$test}" >
335
+ <xsl:if test=" string-length( $id ) &gt; 0">
336
+ <axsl:attribute name="id">
337
+ <xsl:value-of select=" $id " />
338
+ </axsl:attribute>
339
+ </xsl:if>
340
+ <xsl:if test=" string-length( $flag ) &gt; 0">
341
+ <axsl:attribute name="flag">
342
+ <xsl:value-of select=" $flag " />
343
+ </axsl:attribute>
344
+ </xsl:if>
345
+
346
+ <!-- Process rich attributes. -->
347
+ <xsl:call-template name="richParms">
348
+ <xsl:with-param name="fpi" select="$fpi"/>
349
+ <xsl:with-param name="icon" select="$icon"/>
350
+ <xsl:with-param name="lang" select="$lang"/>
351
+ <xsl:with-param name="see" select="$see" />
352
+ <xsl:with-param name="space" select="$space" />
353
+ </xsl:call-template>
354
+ <xsl:call-template name='linkableParms'>
355
+ <xsl:with-param name="role" select="$role" />
356
+ <xsl:with-param name="subject" select="$subject"/>
357
+ </xsl:call-template>
358
+ <xsl:if test=" $generate-paths = 'yes' or $generate-paths = 'true' ">
359
+ <!-- true/false is the new way -->
360
+ <axsl:attribute name="location">
361
+ <axsl:apply-templates select="." mode="schematron-get-full-path"/>
362
+ </axsl:attribute>
363
+ </xsl:if>
364
+
365
+ <svrl:text>
366
+ <xsl:apply-templates mode="text" />
367
+
368
+ </svrl:text>
369
+ <xsl:if test="$diagnose = 'yes' or $diagnose='true' ">
370
+ <!-- true/false is the new way -->
371
+ <xsl:call-template name="diagnosticsSplit">
372
+ <xsl:with-param name="str" select="$diagnostics"/>
373
+ </xsl:call-template>
374
+ </xsl:if>
375
+ </svrl:successful-report>
376
+
377
+
378
+ <xsl:if test=" $terminate = 'yes' or $terminate = 'true' ">
379
+ <axsl:message terminate="yes">TERMINATING</axsl:message>
380
+ </xsl:if>
381
+ </xsl:template>
382
+
383
+
384
+ <!-- Overrides skeleton -->
385
+ <xsl:template name="process-dir" >
386
+ <xsl:param name="value" />
387
+ <xsl:choose>
388
+ <xsl:when test=" $allow-foreign = 'true'">
389
+ <xsl:copy-of select="."/>
390
+ </xsl:when>
391
+
392
+ <xsl:otherwise>
393
+ <!-- We generate too much whitespace rather than risking concatenation -->
394
+ <axsl:text> </axsl:text>
395
+ <xsl:apply-templates mode="inline-text"/>
396
+ <axsl:text> </axsl:text>
397
+ </xsl:otherwise>
398
+ </xsl:choose>
399
+ </xsl:template>
400
+
401
+ <xsl:template name="process-diagnostic">
402
+ <xsl:param name="id"/>
403
+ <!-- Rich parameters -->
404
+ <xsl:param name="fpi" />
405
+ <xsl:param name="icon" />
406
+ <xsl:param name="lang" />
407
+ <xsl:param name="see" />
408
+ <xsl:param name="space" />
409
+ <svrl:diagnostic-reference diagnostic="{$id}" >
410
+
411
+ <xsl:call-template name="richParms">
412
+ <xsl:with-param name="fpi" select="$fpi"/>
413
+ <xsl:with-param name="icon" select="$icon"/>
414
+ <xsl:with-param name="lang" select="$lang"/>
415
+ <xsl:with-param name="see" select="$see" />
416
+ <xsl:with-param name="space" select="$space" />
417
+ </xsl:call-template>
418
+ <xsl:text>
419
+ </xsl:text>
420
+
421
+ <xsl:apply-templates mode="text"/>
422
+
423
+ </svrl:diagnostic-reference>
424
+ </xsl:template>
425
+
426
+
427
+ <!-- Overrides skeleton -->
428
+ <xsl:template name="process-emph" >
429
+ <xsl:param name="class" />
430
+ <xsl:choose>
431
+ <xsl:when test=" $allow-foreign = 'true'">
432
+ <xsl:copy-of select="."/>
433
+ </xsl:when>
434
+ <xsl:otherwise>
435
+ <!-- We generate too much whitespace rather than risking concatenation -->
436
+ <axsl:text> </axsl:text>
437
+ <xsl:apply-templates mode="inline-text"/>
438
+ <axsl:text> </axsl:text>
439
+ </xsl:otherwise>
440
+ </xsl:choose>
441
+ </xsl:template>
442
+
443
+ <xsl:template name="process-rule">
444
+ <xsl:param name="id"/>
445
+ <xsl:param name="context"/>
446
+ <xsl:param name="flag"/>
447
+ <!-- "Linkable" parameters -->
448
+ <xsl:param name="role"/>
449
+ <xsl:param name="subject"/>
450
+ <!-- "Rich" parameters -->
451
+ <xsl:param name="fpi" />
452
+ <xsl:param name="icon" />
453
+ <xsl:param name="lang" />
454
+ <xsl:param name="see" />
455
+ <xsl:param name="space" />
456
+ <xsl:if test=" $generate-fired-rule = 'true'">
457
+ <svrl:fired-rule context="{$context}" >
458
+ <!-- Process rich attributes. -->
459
+ <xsl:call-template name="richParms">
460
+ <xsl:with-param name="fpi" select="$fpi"/>
461
+ <xsl:with-param name="icon" select="$icon"/>
462
+ <xsl:with-param name="lang" select="$lang"/>
463
+ <xsl:with-param name="see" select="$see" />
464
+ <xsl:with-param name="space" select="$space" />
465
+ </xsl:call-template>
466
+ <xsl:if test=" string( $id )">
467
+ <xsl:attribute name="id">
468
+ <xsl:value-of select=" $id " />
469
+ </xsl:attribute>
470
+ </xsl:if>
471
+ <xsl:if test=" string-length( $role ) &gt; 0">
472
+ <xsl:attribute name="role">
473
+ <xsl:value-of select=" $role " />
474
+ </xsl:attribute>
475
+ </xsl:if>
476
+ </svrl:fired-rule>
477
+ </xsl:if>
478
+ </xsl:template>
479
+
480
+ <xsl:template name="process-ns">
481
+ <xsl:param name="prefix"/>
482
+ <xsl:param name="uri"/>
483
+ <svrl:ns-prefix-in-attribute-values uri="{$uri}" prefix="{$prefix}" />
484
+ </xsl:template>
485
+
486
+ <xsl:template name="process-p">
487
+ <xsl:param name="icon"/>
488
+ <xsl:param name="class"/>
489
+ <xsl:param name="id"/>
490
+ <xsl:param name="lang"/>
491
+
492
+ <svrl:text>
493
+ <xsl:apply-templates mode="text"/>
494
+ </svrl:text>
495
+ </xsl:template>
496
+
497
+ <xsl:template name="process-pattern">
498
+ <xsl:param name="name"/>
499
+ <xsl:param name="id"/>
500
+ <xsl:param name="is-a"/>
501
+
502
+ <!-- "Rich" parameters -->
503
+ <xsl:param name="fpi" />
504
+ <xsl:param name="icon" />
505
+ <xsl:param name="lang" />
506
+ <xsl:param name="see" />
507
+ <xsl:param name="space" />
508
+ <svrl:active-pattern >
509
+ <xsl:if test=" string( $id )">
510
+ <axsl:attribute name="id">
511
+ <xsl:value-of select=" $id " />
512
+ </axsl:attribute>
513
+ </xsl:if>
514
+ <xsl:if test=" string( $name )">
515
+ <axsl:attribute name="name">
516
+ <xsl:value-of select=" $name " />
517
+ </axsl:attribute>
518
+ </xsl:if>
519
+
520
+ <xsl:call-template name='richParms'>
521
+ <xsl:with-param name="fpi" select="$fpi"/>
522
+ <xsl:with-param name="icon" select="$icon"/>
523
+ <xsl:with-param name="lang" select="$lang"/>
524
+ <xsl:with-param name="see" select="$see" />
525
+ <xsl:with-param name="space" select="$space" />
526
+ </xsl:call-template>
527
+
528
+ <!-- ?? report that this screws up iso:title processing -->
529
+ <xsl:apply-templates mode="do-pattern-p"/>
530
+ <!-- ?? Seems that this apply-templates is never triggered DP -->
531
+ <axsl:apply-templates />
532
+ </svrl:active-pattern>
533
+ </xsl:template>
534
+
535
+ <!-- Overrides skeleton -->
536
+ <xsl:template name="process-message" >
537
+ <xsl:param name="pattern"/>
538
+ <xsl:param name="role"/>
539
+ </xsl:template>
540
+
541
+
542
+ <!-- Overrides skeleton -->
543
+ <xsl:template name="process-span" >
544
+ <xsl:param name="class" />
545
+ <xsl:choose>
546
+ <xsl:when test=" $allow-foreign = 'true'">
547
+ <xsl:copy-of select="."/>
548
+ </xsl:when>
549
+ <xsl:otherwise>
550
+ <!-- We generate too much whitespace rather than risking concatenation -->
551
+ <axsl:text> </axsl:text>
552
+ <xsl:apply-templates mode="inline-text"/>
553
+ <axsl:text> </axsl:text>
554
+ </xsl:otherwise>
555
+ </xsl:choose>
556
+ </xsl:template>
557
+
558
+ <!-- =========================================================================== -->
559
+ <!-- processing rich parameters. -->
560
+ <xsl:template name='richParms'>
561
+ <!-- "Rich" parameters -->
562
+ <xsl:param name="fpi" />
563
+ <xsl:param name="icon" />
564
+ <xsl:param name="lang" />
565
+ <xsl:param name="see" />
566
+ <xsl:param name="space" />
567
+ <!-- Process rich attributes. -->
568
+ <xsl:if test=" $allow-foreign = 'true'">
569
+ <xsl:if test="string($fpi)">
570
+ <axsl:attribute name="fpi">
571
+ <xsl:value-of select="$fpi"/>
572
+ </axsl:attribute>
573
+ </xsl:if>
574
+ <xsl:if test="string($icon)">
575
+ <axsl:attribute name="icon">
576
+ <xsl:value-of select="$icon"/>
577
+ </axsl:attribute>
578
+ </xsl:if>
579
+ <xsl:if test="string($see)">
580
+ <axsl:attribute name="see">
581
+ <xsl:value-of select="$see"/>
582
+ </axsl:attribute>
583
+ </xsl:if>
584
+ </xsl:if>
585
+ <xsl:if test="string($space)">
586
+ <axsl:attribute name="xml:space">
587
+ <xsl:value-of select="$space"/>
588
+ </axsl:attribute>
589
+ </xsl:if>
590
+ <xsl:if test="string($lang)">
591
+ <axsl:attribute name="xml:lang">
592
+ <xsl:value-of select="$lang"/>
593
+ </axsl:attribute>
594
+ </xsl:if>
595
+ </xsl:template>
596
+
597
+ <!-- processing linkable parameters. -->
598
+ <xsl:template name='linkableParms'>
599
+ <xsl:param name="role"/>
600
+ <xsl:param name="subject"/>
601
+
602
+ <!-- ISO SVRL has a role attribute to match the Schematron role attribute -->
603
+ <xsl:if test=" string($role )">
604
+ <axsl:attribute name="role">
605
+ <xsl:value-of select=" $role " />
606
+ </axsl:attribute>
607
+ </xsl:if>
608
+ <!-- ISO SVRL does not have a subject attribute to match the Schematron subject attribute.
609
+ Instead, the Schematron subject attribute is folded into the location attribute -->
610
+ </xsl:template>
611
+
612
+
613
+ </xsl:stylesheet>
614
+