simple-xspec-wrapper 0.1.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/.travis.yml +11 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +37 -0
- data/LICENSE.txt +21 -0
- data/README.md +49 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/xspec +16 -0
- data/lib/xspec/version.rb +3 -0
- data/lib/xspec.rb +256 -0
- data/simple-xspec-wrapper.gemspec +28 -0
- data/spec-test.xml +1125 -0
- data/vendor/xspec-1.0.0/.gitignore +7 -0
- data/vendor/xspec-1.0.0/.travis.yml +57 -0
- data/vendor/xspec-1.0.0/LICENSE +21 -0
- data/vendor/xspec-1.0.0/README.md +26 -0
- data/vendor/xspec-1.0.0/appveyor.yml +77 -0
- data/vendor/xspec-1.0.0/bin/xspec.bat +620 -0
- data/vendor/xspec-1.0.0/bin/xspec.sh +403 -0
- data/vendor/xspec-1.0.0/build.xml +369 -0
- data/vendor/xspec-1.0.0/editors/emacs/README +31 -0
- data/vendor/xspec-1.0.0/editors/emacs/schemas.xml +6 -0
- data/vendor/xspec-1.0.0/editors/oxygen/.cvsignore +2 -0
- data/vendor/xspec-1.0.0/editors/oxygen/README +11 -0
- data/vendor/xspec-1.0.0/editors/oxygen/build.xml +38 -0
- data/vendor/xspec-1.0.0/editors/oxygen/templates/xspec.xml +17 -0
- data/vendor/xspec-1.0.0/editors/oxygen/xspec.framework +175 -0
- data/vendor/xspec-1.0.0/find-examples.xml +37 -0
- data/vendor/xspec-1.0.0/find-examples.xsl +615 -0
- data/vendor/xspec-1.0.0/graphics/3angle-down.gif +0 -0
- data/vendor/xspec-1.0.0/graphics/3angle-right.gif +0 -0
- data/vendor/xspec-1.0.0/java/com/jenitennison/xslt/tests/XSLTCoverageTraceListener.class +0 -0
- data/vendor/xspec-1.0.0/java/com/jenitennison/xslt/tests/XSLTCoverageTraceListener.java +209 -0
- data/vendor/xspec-1.0.0/src/ant/find-test-failure.xsl +17 -0
- data/vendor/xspec-1.0.0/src/ant/get-schematron-phase.xsl +17 -0
- data/vendor/xspec-1.0.0/src/ant/locate-schematron.xsl +28 -0
- data/vendor/xspec-1.0.0/src/ant/make-path.js +4 -0
- data/vendor/xspec-1.0.0/src/compiler/generate-common-tests.xsl +604 -0
- data/vendor/xspec-1.0.0/src/compiler/generate-query-helper.xsl +152 -0
- data/vendor/xspec-1.0.0/src/compiler/generate-query-tests.xsl +473 -0
- data/vendor/xspec-1.0.0/src/compiler/generate-query-utils.xql +263 -0
- data/vendor/xspec-1.0.0/src/compiler/generate-tests-helper.xsl +169 -0
- data/vendor/xspec-1.0.0/src/compiler/generate-tests-utils.xsl +479 -0
- data/vendor/xspec-1.0.0/src/compiler/generate-xspec-tests.xsl +503 -0
- data/vendor/xspec-1.0.0/src/harnesses/basex/basex-standalone-xquery-harness.xproc +135 -0
- data/vendor/xspec-1.0.0/src/harnesses/basex/basex-xquery-harness.xproc +133 -0
- data/vendor/xspec-1.0.0/src/harnesses/exist/exist-xquery-harness.xproc +161 -0
- data/vendor/xspec-1.0.0/src/harnesses/harness-lib.xpl +327 -0
- data/vendor/xspec-1.0.0/src/harnesses/marklogic/ml-xquery-harness.xproc +143 -0
- data/vendor/xspec-1.0.0/src/harnesses/saxon/saxon-xquery-harness.xproc +108 -0
- data/vendor/xspec-1.0.0/src/harnesses/saxon/saxon-xslt-harness.xproc +85 -0
- data/vendor/xspec-1.0.0/src/harnesses/zorba/zorba-xquery-harness.xproc +134 -0
- data/vendor/xspec-1.0.0/src/reporter/coverage-report.xsl +378 -0
- data/vendor/xspec-1.0.0/src/reporter/format-utils.xsl +220 -0
- data/vendor/xspec-1.0.0/src/reporter/format-xspec-report-folding.xsl +164 -0
- data/vendor/xspec-1.0.0/src/reporter/format-xspec-report.xsl +410 -0
- data/vendor/xspec-1.0.0/src/reporter/junit-report.xsl +93 -0
- data/vendor/xspec-1.0.0/src/reporter/test-report.css +469 -0
- data/vendor/xspec-1.0.0/src/schemas/find-examples.rnc +90 -0
- data/vendor/xspec-1.0.0/src/schemas/xspec.rnc +304 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_abstract_expand.xsl +313 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_dsdl_include.xsl +1519 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_message.xsl +64 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_message_xslt2.xsl +64 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_skeleton_for_saxon.xsl +2306 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_schematron_skeleton_for_xslt1.xsl +1851 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_svrl_for_xslt1.xsl +614 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/iso_svrl_for_xslt2.xsl +692 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/readme.txt +101 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-cs.xhtml +56 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-de.xhtml +55 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-en.xhtml +57 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-fr.xhtml +54 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-ja.xhtml +53 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/sch-messages-nl.xhtml +58 -0
- data/vendor/xspec-1.0.0/src/schematron/iso-schematron/schematron-skeleton-api.htm +723 -0
- data/vendor/xspec-1.0.0/src/schematron/sch-location-compare.xsl +139 -0
- data/vendor/xspec-1.0.0/src/schematron/schut-to-xspec.xsl +179 -0
- data/vendor/xspec-1.0.0/test/Makefile +117 -0
- data/vendor/xspec-1.0.0/test/README +5 -0
- data/vendor/xspec-1.0.0/test/catalog/xspec-160_catalog.xml +4 -0
- data/vendor/xspec-1.0.0/test/catalog/xspec-160_schematron.xspec +6 -0
- data/vendor/xspec-1.0.0/test/catalog/xspec-160_xslt.xspec +5 -0
- data/vendor/xspec-1.0.0/test/end-to-end/README.md +42 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/.gitignore +1 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/.gitignore +3 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-50-result-norm.html +74 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-55-result-norm.html +112 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-focus-1-result-norm.html +109 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-function-result-norm.html +118 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-import-result-norm.html +163 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-imported-result-norm.html +95 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-pending-result-norm.html +123 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-rule-result-norm.html +109 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/expected/xspec-three-dots-result-norm.html +1237 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-50.xsl +7 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-50.xspec +10 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-55.xsl +2 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-55.xspec +18 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-focus-1.xspec +71 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-function.xspec +50 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-import.xspec +50 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-imported.xspec +48 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-pending.xspec +89 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-rule.xspec +76 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-three-dots.xsl +49 -0
- data/vendor/xspec-1.0.0/test/end-to-end/cases/xspec-three-dots.xspec +527 -0
- data/vendor/xspec-1.0.0/test/end-to-end/generate-expected.cmd +51 -0
- data/vendor/xspec-1.0.0/test/end-to-end/generate-expected.sh +25 -0
- data/vendor/xspec-1.0.0/test/end-to-end/processor/_deserializer.xsl +53 -0
- data/vendor/xspec-1.0.0/test/end-to-end/processor/_normalizer.xsl +192 -0
- data/vendor/xspec-1.0.0/test/end-to-end/processor/_serializer.xsl +15 -0
- data/vendor/xspec-1.0.0/test/end-to-end/processor/_util.xsl +35 -0
- data/vendor/xspec-1.0.0/test/end-to-end/processor/compare.xsl +88 -0
- data/vendor/xspec-1.0.0/test/end-to-end/processor/normalize.xsl +28 -0
- data/vendor/xspec-1.0.0/test/end-to-end/run-e2e-tests.cmd +61 -0
- data/vendor/xspec-1.0.0/test/end-to-end/run-e2e-tests.sh +28 -0
- data/vendor/xspec-1.0.0/test/generate-tests-utils.xspec +636 -0
- data/vendor/xspec-1.0.0/test/generate-x-utils.xspec +173 -0
- data/vendor/xspec-1.0.0/test/generate-xspec-tests.xspec +64 -0
- data/vendor/xspec-1.0.0/test/run-xspec-tests.cmd +83 -0
- data/vendor/xspec-1.0.0/test/run-xspec-tests.sh +42 -0
- data/vendor/xspec-1.0.0/test/sch-location-compare.xspec +179 -0
- data/vendor/xspec-1.0.0/test/schematron/data/standards.xml +7 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-017.sch +9 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-018.sch +17 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-019.sch +13 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-020-01.sch +35 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-020.sch +32 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-021.sch +28 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-022.sch +18 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-xslt-compile.xsl +8 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-xslt-expand.xsl +8 -0
- data/vendor/xspec-1.0.0/test/schematron/schematron-xslt-include.xsl +8 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-001-in.xspec +5 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-001-out.xspec +7 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-002-in.xspec +5 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-002-out.xspec +7 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-002.sch +4 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-003-in.xspec +7 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-003-out.xspec +9 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-004-in.xspec +20 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-004-out.xspec +22 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-005-in.xspec +6 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-005-out.xspec +8 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-006-in.xspec +11 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-006-out.xspec +13 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-007-in.xspec +7 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-007-out.xspec +9 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-007.xml +2 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-008-in.xspec +9 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-008-out.xspec +9 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-009-import-in.xspec +5 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-009-in.xspec +6 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-009-out.xspec +10 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-010-import.xspec +5 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-010-in.xspec +6 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-010-out.xspec +8 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-011-in.xspec +6 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-011-out.xspec +8 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-012-01.xml +4 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-012-02.xml +13 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-012-out.xspec +81 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-013-in.xspec +6 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-013-out.xspec +8 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-test.sch +4 -0
- data/vendor/xspec-1.0.0/test/schematron/schut-to-xspec-test.sch.xsl +4 -0
- data/vendor/xspec-1.0.0/test/schematron-01.sch +17 -0
- data/vendor/xspec-1.0.0/test/schematron-01.xml +14 -0
- data/vendor/xspec-1.0.0/test/schematron-01.xspec +14 -0
- data/vendor/xspec-1.0.0/test/schematron-012.xspec +83 -0
- data/vendor/xspec-1.0.0/test/schematron-014-01.xml +10 -0
- data/vendor/xspec-1.0.0/test/schematron-014.sch +16 -0
- data/vendor/xspec-1.0.0/test/schematron-014.xspec +11 -0
- data/vendor/xspec-1.0.0/test/schematron-015.sch +16 -0
- data/vendor/xspec-1.0.0/test/schematron-015.xspec +11 -0
- data/vendor/xspec-1.0.0/test/schematron-016.sch +19 -0
- data/vendor/xspec-1.0.0/test/schematron-016.xspec +171 -0
- data/vendor/xspec-1.0.0/test/schematron-017.xspec +26 -0
- data/vendor/xspec-1.0.0/test/schematron-018.xspec +120 -0
- data/vendor/xspec-1.0.0/test/schematron-019.xspec +16 -0
- data/vendor/xspec-1.0.0/test/schematron-020.xspec +53 -0
- data/vendor/xspec-1.0.0/test/schematron-021.xspec +27 -0
- data/vendor/xspec-1.0.0/test/schematron-022.xspec +15 -0
- data/vendor/xspec-1.0.0/test/schematron-param-001.xspec +50 -0
- data/vendor/xspec-1.0.0/test/schut-to-xspec-012.sch +27 -0
- data/vendor/xspec-1.0.0/test/schut-to-xspec.xspec +85 -0
- data/vendor/xspec-1.0.0/test/unit-expect-xsl.xspec +28 -0
- data/vendor/xspec-1.0.0/test/xspec-26.xsl +19 -0
- data/vendor/xspec-1.0.0/test/xspec-26.xspec +17 -0
- data/vendor/xspec-1.0.0/test/xspec-30.xml +2 -0
- data/vendor/xspec-1.0.0/test/xspec-30.xsl +6 -0
- data/vendor/xspec-1.0.0/test/xspec-30.xspec +8 -0
- data/vendor/xspec-1.0.0/test/xspec-33.xsl +7 -0
- data/vendor/xspec-1.0.0/test/xspec-33.xspec +15 -0
- data/vendor/xspec-1.0.0/test/xspec-46.xsl +7 -0
- data/vendor/xspec-1.0.0/test/xspec-46.xspec +9 -0
- data/vendor/xspec-1.0.0/test/xspec-72.xsl +13 -0
- data/vendor/xspec-1.0.0/test/xspec-72.xspec +19 -0
- data/vendor/xspec-1.0.0/test/xspec-bat.cmd +757 -0
- data/vendor/xspec-1.0.0/test/xspec-focus-2.xspec +91 -0
- data/vendor/xspec-1.0.0/test/xspec-junit.xspec +78 -0
- data/vendor/xspec-1.0.0/test/xspec-result-naming-collision.xml +1003 -0
- data/vendor/xspec-1.0.0/test/xspec-result-naming-collision.xslt +10 -0
- data/vendor/xspec-1.0.0/test/xspec-result-naming-collision.xspec +13 -0
- data/vendor/xspec-1.0.0/test/xspec-tested.xql +44 -0
- data/vendor/xspec-1.0.0/test/xspec-tested.xsl +64 -0
- data/vendor/xspec-1.0.0/test/xspec-variable.xml +3 -0
- data/vendor/xspec-1.0.0/test/xspec-variable.xspec +58 -0
- data/vendor/xspec-1.0.0/test/xspec-xslt3.xsl +13 -0
- data/vendor/xspec-1.0.0/test/xspec-xslt3.xspec +12 -0
- data/vendor/xspec-1.0.0/test/xspec.bats +420 -0
- data/vendor/xspec-1.0.0/tutorial/escape-for-regex.xslt +40 -0
- data/vendor/xspec-1.0.0/tutorial/escape-for-regex.xspec +75 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-01.sch +17 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-01.xml +11 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-01.xspec +14 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-PhaseA.xspec +11 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-PhaseB.xspec +12 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-import1.xspec +10 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-import2.xspec +8 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-02-import3.xspec +10 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-02.sch +58 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-02.xml +19 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-03-doc1.xml +6 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-03-doc2.xml +7 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-03.sch +29 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-03.xspec +63 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-04.sch +20 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/demo-04.xspec +33 -0
- data/vendor/xspec-1.0.0/tutorial/schematron/quickfix.sch +81 -0
- data/vendor/xspec-1.0.0/tutorial/xquery-tutorial.xq +8 -0
- data/vendor/xspec-1.0.0/tutorial/xquery-tutorial.xspec +16 -0
- data/vendor/xspec-1.0.0/xproject/project.xml +8 -0
- data/vendor/xspec-1.0.0/xproject/release-project.xsl +41 -0
- metadata +341 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
|
3
|
+
<sch:pattern>
|
4
|
+
<sch:rule context="div">
|
5
|
+
<sch:assert id="a1" role="warn" test="not(section)">A section inside a div is usually superflous</sch:assert>
|
6
|
+
<sch:assert id="a2" role="error" test="node()">div should not be empty</sch:assert>
|
7
|
+
<sch:report id="r1" role="warn" test="string-length(normalize-space()) gt 10">text is longer than 10 characters</sch:report>
|
8
|
+
<sch:report id="r2" role="warn" test="img">An image was found</sch:report>
|
9
|
+
</sch:rule>
|
10
|
+
</sch:pattern>
|
11
|
+
<sch:pattern>
|
12
|
+
<sch:rule context="section" id="ru1" role="error">
|
13
|
+
<sch:assert test="title">section should have a title</sch:assert>
|
14
|
+
<sch:assert test="p[2]" role="warn">section should contain at least 2 paragraphs</sch:assert>
|
15
|
+
<sch:assert test="img" id="ru2">section should contain an image</sch:assert>
|
16
|
+
</sch:rule>
|
17
|
+
<sch:rule context="article" id="ru3" role="warn">
|
18
|
+
<sch:assert test="div">article should contain div</sch:assert>
|
19
|
+
<sch:report test="div[2]">article has more than 1 div</sch:report>
|
20
|
+
</sch:rule>
|
21
|
+
</sch:pattern>
|
22
|
+
<sch:pattern id="pattern3">
|
23
|
+
<sch:rule context="section">
|
24
|
+
<sch:assert test="title">section should have a title</sch:assert>
|
25
|
+
</sch:rule>
|
26
|
+
</sch:pattern>
|
27
|
+
</sch:schema>
|
@@ -0,0 +1,85 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec"
|
3
|
+
xmlns:s="http://www.jenitennison.com/xslt/xspec/schematron" stylesheet="../src/schematron/schut-to-xspec.xsl">
|
4
|
+
<x:param name="stylesheet" select="'schut-to-xspec-test.sch.xsl'"/>
|
5
|
+
<x:scenario label="templates">
|
6
|
+
<x:scenario label="identity">
|
7
|
+
<x:context>
|
8
|
+
<example attr="1">
|
9
|
+
<!-- comment -->
|
10
|
+
<?pi?>
|
11
|
+
<p>this is a <i>mixed</i> text <b> example</b>.</p>
|
12
|
+
<other xmlns="other">foreign</other>
|
13
|
+
</example>
|
14
|
+
</x:context>
|
15
|
+
<x:expect label="copied">
|
16
|
+
<example attr="1">
|
17
|
+
<!-- comment -->
|
18
|
+
<?pi?>
|
19
|
+
<p>this is a <i>mixed</i> text <b> example</b>.</p>
|
20
|
+
<other xmlns="other">foreign</other>
|
21
|
+
</example>
|
22
|
+
</x:expect>
|
23
|
+
</x:scenario>
|
24
|
+
</x:scenario>
|
25
|
+
<x:scenario label="description">
|
26
|
+
<x:scenario label="no phase">
|
27
|
+
<x:context href="schematron/schut-to-xspec-001-in.xspec"/>
|
28
|
+
<x:expect label="xspec description" href="schematron/schut-to-xspec-001-out.xspec"/>
|
29
|
+
</x:scenario>
|
30
|
+
<x:scenario label="with phase">
|
31
|
+
<x:context href="schematron/schut-to-xspec-011-in.xspec"/>
|
32
|
+
<x:expect label="xspec description" href="schematron/schut-to-xspec-011-out.xspec"/>
|
33
|
+
</x:scenario>
|
34
|
+
<x:scenario label="with phase in select">
|
35
|
+
<x:context href="schematron/schut-to-xspec-013-in.xspec"/>
|
36
|
+
<x:expect label="xspec description" href="schematron/schut-to-xspec-013-out.xspec"/>
|
37
|
+
</x:scenario>
|
38
|
+
</x:scenario>
|
39
|
+
<x:scenario label="namespaces defined in Schematron">
|
40
|
+
<x:context href="schematron/schut-to-xspec-002-in.xspec"/>
|
41
|
+
<x:expect label="copied from sch:ns to x:description" href="schematron/schut-to-xspec-002-out.xspec"/>
|
42
|
+
</x:scenario>
|
43
|
+
<x:scenario label="scenario">
|
44
|
+
<x:scenario label="nested">
|
45
|
+
<x:context href="schematron/schut-to-xspec-003-in.xspec"/>
|
46
|
+
<x:expect label="nested scenarios" href="schematron/schut-to-xspec-003-out.xspec"/>
|
47
|
+
</x:scenario>
|
48
|
+
<x:scenario label="pending">
|
49
|
+
<x:context href="schematron/schut-to-xspec-004-in.xspec"/>
|
50
|
+
<x:expect label="pending scenarios" href="schematron/schut-to-xspec-004-out.xspec"/>
|
51
|
+
</x:scenario>
|
52
|
+
<x:scenario label="focus">
|
53
|
+
<x:context href="schematron/schut-to-xspec-005-in.xspec"/>
|
54
|
+
<x:expect label="focused scenario" href="schematron/schut-to-xspec-005-out.xspec"/>
|
55
|
+
</x:scenario>
|
56
|
+
<x:scenario label="shared">
|
57
|
+
<x:context href="schematron/schut-to-xspec-006-in.xspec"/>
|
58
|
+
<x:expect label="shared scenarios" href="schematron/schut-to-xspec-006-out.xspec"/>
|
59
|
+
</x:scenario>
|
60
|
+
</x:scenario>
|
61
|
+
<x:scenario label="context">
|
62
|
+
<x:scenario label="file">
|
63
|
+
<x:context href="schematron/schut-to-xspec-007-in.xspec"/>
|
64
|
+
<x:expect label="context href" href="schematron/schut-to-xspec-007-out.xspec"/>
|
65
|
+
</x:scenario>
|
66
|
+
<x:scenario label="inline" pending="Can't test inline context because of error: "XTDE1480: Cannot execute xsl:result-document while evaluating xsl:variable"">
|
67
|
+
<x:context href="schematron/schut-to-xspec-008-in.xspec"/>
|
68
|
+
<x:expect label="context href to generated file" href="schematron/schut-to-xspec-008-out.xspec"/>
|
69
|
+
</x:scenario>
|
70
|
+
</x:scenario>
|
71
|
+
<x:scenario label="import">
|
72
|
+
<x:scenario label="type schut (default)">
|
73
|
+
<x:context href="schematron/schut-to-xspec-009-in.xspec"/>
|
74
|
+
<x:expect label="copy contents of imported file" href="schematron/schut-to-xspec-009-out.xspec"/>
|
75
|
+
</x:scenario>
|
76
|
+
<x:scenario label="type xspec">
|
77
|
+
<x:context href="schematron/schut-to-xspec-010-in.xspec"/>
|
78
|
+
<x:expect label="import href" href="schematron/schut-to-xspec-010-out.xspec"/>
|
79
|
+
</x:scenario>
|
80
|
+
</x:scenario>
|
81
|
+
<x:scenario label="assertions">
|
82
|
+
<x:context href="schematron-012.xspec" select="x:description"/>
|
83
|
+
<x:expect label="expect elements with correct label and test" href="schematron/schut-to-xspec-012-out.xspec" select="x:description"/>
|
84
|
+
</x:scenario>
|
85
|
+
</x:description>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- ===================================================================== -->
|
3
|
+
<!-- File: test/unit-expect-xsl.xspec -->
|
4
|
+
<!-- Author: Florent Georges -->
|
5
|
+
<!-- Tags: -->
|
6
|
+
<!-- Copyright (c) 2010 Florent Georges (see end of file.) -->
|
7
|
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
8
|
+
<!--
|
9
|
+
Test only the XSLT version. It is very difficult to test the (textual)
|
10
|
+
XQuery output. Unless, of course, we use XQueryX...
|
11
|
+
-->
|
12
|
+
<t:description xmlns:t="http://www.jenitennison.com/xslt/xspec" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" stylesheet="../src/compiler/generate-xspec-tests.xsl">
|
13
|
+
<!--
|
14
|
+
TODO: Track down how it is transformed (named templated, rule
|
15
|
+
in a mode, etc.) and test it explicitely...
|
16
|
+
-->
|
17
|
+
<t:scenario label="pending call">
|
18
|
+
<t:context mode="t:compile">
|
19
|
+
<t:param tunnel="yes" name="context"/>
|
20
|
+
<t:param tunnel="yes" name="call"/>
|
21
|
+
<t:expect test="false()"/>
|
22
|
+
</t:context>
|
23
|
+
<t:expect label="is a template" test="$t:result instance of element(xsl:template)"/>
|
24
|
+
<t:expect label="@test must be transformed to @select" test="$t:result/xsl:variable[@name eq 'impl:test-result']/*/xsl:otherwise/*">
|
25
|
+
<xsl:sequence select="false()" version="..."/>
|
26
|
+
</t:expect>
|
27
|
+
</t:scenario>
|
28
|
+
</t:description>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3
|
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
4
|
+
exclude-result-prefixes="xs"
|
5
|
+
version="2.0">
|
6
|
+
|
7
|
+
<xsl:template match="document">
|
8
|
+
<container>
|
9
|
+
<xsl:apply-templates/>
|
10
|
+
</container>
|
11
|
+
</xsl:template>
|
12
|
+
|
13
|
+
<xsl:template match="heading">
|
14
|
+
<child>
|
15
|
+
<xsl:apply-templates/>
|
16
|
+
</child>
|
17
|
+
</xsl:template>
|
18
|
+
|
19
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- full description at https://github.com/xspec/xspec/26 -->
|
3
|
+
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="xspec-26.xsl">
|
4
|
+
<x:scenario label="When converting heading element">
|
5
|
+
<x:context>
|
6
|
+
<document>
|
7
|
+
<heading>Some Text</heading>
|
8
|
+
</document>
|
9
|
+
</x:context>
|
10
|
+
<x:expect label="Wrap it in a container element">
|
11
|
+
<container>...</container>
|
12
|
+
</x:expect>
|
13
|
+
<x:expect label="With a child" test="container/child[1]">
|
14
|
+
<child>Some Text</child>
|
15
|
+
</x:expect>
|
16
|
+
</x:scenario>
|
17
|
+
</x:description>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- full description at https://github.com/xspec/xspec/issues/30 -->
|
3
|
+
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="xspec-30.xsl">
|
4
|
+
<x:scenario label="When an XML is passed via the href attribute of x:context">
|
5
|
+
<x:context href="xspec-30.xml"/>
|
6
|
+
<x:expect href="xspec-30.xml" label="the href attribute of x:expect works"/>
|
7
|
+
</x:scenario>
|
8
|
+
</x:description>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="xspec-33.xsl">
|
3
|
+
<x:scenario label="When context contains descendant">
|
4
|
+
<x:context>
|
5
|
+
<foo>
|
6
|
+
<bar>
|
7
|
+
<baz>original-text</baz>
|
8
|
+
</bar>
|
9
|
+
</foo>
|
10
|
+
</x:context>
|
11
|
+
<x:expect label="descendant is picked up correctly using XPath in @test" test="descendant::baz">
|
12
|
+
<baz>original-text</baz>
|
13
|
+
</x:expect>
|
14
|
+
</x:scenario>
|
15
|
+
</x:description>
|
@@ -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="node()" match="node()">
|
5
|
+
<xsl:sequence select="." />
|
6
|
+
</xsl:template>
|
7
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema" stylesheet="xspec-46.xsl">
|
3
|
+
<x:scenario label="Scenario-1">
|
4
|
+
<x:context>
|
5
|
+
<foo/>
|
6
|
+
</x:context>
|
7
|
+
<x:expect label="Expect-1" select="1" test="count(foo)"/>
|
8
|
+
</x:scenario>
|
9
|
+
</x:description>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
3
|
+
|
4
|
+
<xsl:output encoding="UTF-8"/>
|
5
|
+
|
6
|
+
<xsl:template match="@*|node()">
|
7
|
+
<xsl:copy>
|
8
|
+
<xsl:apply-templates select="@*|node()"/>
|
9
|
+
</xsl:copy>
|
10
|
+
</xsl:template>
|
11
|
+
|
12
|
+
</xsl:stylesheet>
|
13
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" xmlns:fn="http://www.w3.org/2005/xpath-functions" stylesheet="xspec-72.xsl">
|
3
|
+
<x:scenario label="When processing text in UTF-8">
|
4
|
+
<x:context>
|
5
|
+
<text>
|
6
|
+
<p>Überprüfung von Umlauten</p>
|
7
|
+
<p>Œ, œ, Ÿ</p>
|
8
|
+
<p>Бесы</p>
|
9
|
+
</text>
|
10
|
+
</x:context>
|
11
|
+
<x:expect label="the encoding is correct">
|
12
|
+
<text>
|
13
|
+
<p>Überprüfung von Umlauten</p>
|
14
|
+
<p>Œ, œ, Ÿ</p>
|
15
|
+
<p>Бесы</p>
|
16
|
+
</text>
|
17
|
+
</x:expect>
|
18
|
+
</x:scenario>
|
19
|
+
</x:description>
|