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.
- 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,479 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- ===================================================================== -->
|
|
3
|
+
<!-- File: generate-tests-utils.xsl -->
|
|
4
|
+
<!-- Author: Jeni Tennsion -->
|
|
5
|
+
<!-- URL: http://github.com/xspec/xspec -->
|
|
6
|
+
<!-- Tags: -->
|
|
7
|
+
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
|
|
8
|
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<xsl:stylesheet version="2.0"
|
|
12
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
13
|
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
14
|
+
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
|
|
15
|
+
exclude-result-prefixes="xs t msxsl"
|
|
16
|
+
xmlns:test="http://www.jenitennison.com/xslt/unit-test"
|
|
17
|
+
xmlns:x="http://www.jenitennison.com/xslt/xspec"
|
|
18
|
+
extension-element-prefixes="test"
|
|
19
|
+
xmlns:pkg="http://expath.org/ns/pkg"
|
|
20
|
+
xmlns:t="http://www.jenitennison.com/xslt/unit-testAlias">
|
|
21
|
+
|
|
22
|
+
<pkg:import-uri>http://www.jenitennison.com/xslt/xspec/generate-tests-utils.xsl</pkg:import-uri>
|
|
23
|
+
|
|
24
|
+
<xsl:namespace-alias stylesheet-prefix="t" result-prefix="test"/>
|
|
25
|
+
|
|
26
|
+
<!-- TODO: ... -->
|
|
27
|
+
<xsl:param name="debug" as="xs:boolean" select="true()"/>
|
|
28
|
+
|
|
29
|
+
<!-- Generate an human-readable path to a node within its document. -->
|
|
30
|
+
<xsl:function name="x:node-path" as="xs:string">
|
|
31
|
+
<xsl:param name="n" as="node()"/>
|
|
32
|
+
<!-- TODO: In case of a root document node, the path begins with '//'... -->
|
|
33
|
+
<xsl:sequence select="string-join($n/ancestor-or-self::node()/x:node-step(.), '/')"/>
|
|
34
|
+
</xsl:function>
|
|
35
|
+
|
|
36
|
+
<xsl:function name="x:node-step" as="xs:string">
|
|
37
|
+
<xsl:param name="n" as="node()"/>
|
|
38
|
+
<xsl:choose>
|
|
39
|
+
<xsl:when test="$n instance of document-node()">
|
|
40
|
+
<xsl:sequence select="'/'"/>
|
|
41
|
+
</xsl:when>
|
|
42
|
+
<xsl:when test="$n instance of element()">
|
|
43
|
+
<xsl:variable name="precedings" select="
|
|
44
|
+
$n/preceding-sibling::*[name(.) eq name($n)]"/>
|
|
45
|
+
<xsl:sequence select="concat(name($n), x:node-position($precedings))"/>
|
|
46
|
+
</xsl:when>
|
|
47
|
+
<xsl:when test="$n instance of attribute()">
|
|
48
|
+
<xsl:sequence select="concat('@', name($n))"/>
|
|
49
|
+
</xsl:when>
|
|
50
|
+
<xsl:when test="$n instance of text()">
|
|
51
|
+
<xsl:variable name="precedings" select="
|
|
52
|
+
$n/preceding-sibling::text()"/>
|
|
53
|
+
<xsl:sequence select="concat('text()', x:node-position($precedings))"/>
|
|
54
|
+
</xsl:when>
|
|
55
|
+
<xsl:when test="$n instance of comment()">
|
|
56
|
+
<xsl:variable name="precedings" select="
|
|
57
|
+
$n/preceding-sibling::comment()"/>
|
|
58
|
+
<xsl:sequence select="concat('comment()', x:node-position($precedings))"/>
|
|
59
|
+
</xsl:when>
|
|
60
|
+
<xsl:when test="$n instance of processing-instruction()">
|
|
61
|
+
<xsl:variable name="precedings" select="
|
|
62
|
+
$n/preceding-sibling::processing-instruction[name(.) eq name($n)]"/>
|
|
63
|
+
<xsl:sequence select="concat('pi(', name($n), ')', x:node-position($precedings))"/>
|
|
64
|
+
</xsl:when>
|
|
65
|
+
<!-- if not, that's a namespace node -->
|
|
66
|
+
<xsl:otherwise>
|
|
67
|
+
<xsl:sequence select="concat('ns({', name($n), '}', $n, ')')"/>
|
|
68
|
+
</xsl:otherwise>
|
|
69
|
+
</xsl:choose>
|
|
70
|
+
</xsl:function>
|
|
71
|
+
|
|
72
|
+
<xsl:function name="x:node-position" as="xs:string?">
|
|
73
|
+
<xsl:param name="precedings" as="node()*"/>
|
|
74
|
+
<xsl:if test="exists($precedings)">
|
|
75
|
+
<xsl:sequence select="concat('[', count($precedings) + 1, ']')"/>
|
|
76
|
+
</xsl:if>
|
|
77
|
+
</xsl:function>
|
|
78
|
+
|
|
79
|
+
<xsl:function name="test:deep-equal" as="xs:boolean">
|
|
80
|
+
<xsl:param name="seq1" as="item()*" />
|
|
81
|
+
<xsl:param name="seq2" as="item()*" />
|
|
82
|
+
<xsl:sequence select="test:deep-equal($seq1, $seq2, 2.0)" />
|
|
83
|
+
</xsl:function>
|
|
84
|
+
|
|
85
|
+
<xsl:function name="test:deep-equal" as="xs:boolean">
|
|
86
|
+
<xsl:param name="seq1" as="item()*"/>
|
|
87
|
+
<xsl:param name="seq2" as="item()*"/>
|
|
88
|
+
<xsl:param name="version" as="xs:double"/>
|
|
89
|
+
<!-- Using a $param in @use-when does not work. TODO: What to do? At run time? -->
|
|
90
|
+
<!--xsl:if test="$seq1 instance of node()" use-when="$debug">
|
|
91
|
+
<xsl:message select="'DEEP-EQUAL: SEQ1:', x:node-path($seq1)"/>
|
|
92
|
+
</xsl:if>
|
|
93
|
+
<xsl:if test="$seq2 instance of node()" use-when="$debug">
|
|
94
|
+
<xsl:message select="'DEEP-EQUAL: SEQ2:', x:node-path($seq2)"/>
|
|
95
|
+
</xsl:if-->
|
|
96
|
+
<xsl:variable name="result" as="xs:boolean">
|
|
97
|
+
<xsl:choose>
|
|
98
|
+
<xsl:when test="$version = 1.0">
|
|
99
|
+
<xsl:choose>
|
|
100
|
+
<xsl:when test="$seq1 instance of xs:string and
|
|
101
|
+
$seq2 instance of text()+">
|
|
102
|
+
<xsl:sequence select="test:deep-equal($seq1, string-join($seq2, ''))"/>
|
|
103
|
+
</xsl:when>
|
|
104
|
+
<xsl:when test="$seq1 instance of xs:double and
|
|
105
|
+
$seq2 instance of text()+">
|
|
106
|
+
<xsl:sequence select="test:deep-equal($seq1, xs:double(string-join($seq2, '')))"/>
|
|
107
|
+
</xsl:when>
|
|
108
|
+
<xsl:when test="$seq1 instance of xs:decimal and
|
|
109
|
+
$seq2 instance of text()+">
|
|
110
|
+
<xsl:sequence select="test:deep-equal($seq1, xs:decimal(string-join($seq2, '')))"/>
|
|
111
|
+
</xsl:when>
|
|
112
|
+
<xsl:when test="$seq1 instance of xs:integer and
|
|
113
|
+
$seq2 instance of text()+">
|
|
114
|
+
<xsl:sequence select="test:deep-equal($seq1, xs:integer(string-join($seq2, '')))"/>
|
|
115
|
+
</xsl:when>
|
|
116
|
+
<xsl:otherwise>
|
|
117
|
+
<xsl:sequence select="test:deep-equal($seq1, $seq2)"/>
|
|
118
|
+
</xsl:otherwise>
|
|
119
|
+
</xsl:choose>
|
|
120
|
+
</xsl:when>
|
|
121
|
+
<xsl:when test="empty($seq1) or empty($seq2)">
|
|
122
|
+
<xsl:sequence select="empty($seq1) and empty($seq2)"/>
|
|
123
|
+
</xsl:when>
|
|
124
|
+
<xsl:when test="count($seq1) = count($seq2)">
|
|
125
|
+
<xsl:sequence select="every $i in (1 to count($seq1))
|
|
126
|
+
satisfies test:item-deep-equal($seq1[$i], $seq2[$i])"/>
|
|
127
|
+
</xsl:when>
|
|
128
|
+
<xsl:when test="$seq1 instance of text() and
|
|
129
|
+
$seq2 instance of text()+">
|
|
130
|
+
<xsl:variable name="seq2" as="text()">
|
|
131
|
+
<xsl:value-of select="$seq2" separator=""/>
|
|
132
|
+
</xsl:variable>
|
|
133
|
+
<xsl:sequence select="test:deep-equal($seq1, $seq2, $version)"/>
|
|
134
|
+
</xsl:when>
|
|
135
|
+
<xsl:when test="$seq1 instance of node()+ and $seq2 instance of node()+ and empty($seq1[. instance of attribute()]) and empty($seq2[. instance of attribute()])">
|
|
136
|
+
<xsl:variable name="seq1a" as="document-node()">
|
|
137
|
+
<xsl:document>
|
|
138
|
+
<xsl:sequence select="$seq1"/>
|
|
139
|
+
</xsl:document>
|
|
140
|
+
</xsl:variable>
|
|
141
|
+
<xsl:variable name="seq2a" as="document-node()">
|
|
142
|
+
<xsl:document>
|
|
143
|
+
<xsl:sequence select="$seq2"/>
|
|
144
|
+
</xsl:document>
|
|
145
|
+
</xsl:variable>
|
|
146
|
+
<xsl:choose>
|
|
147
|
+
<xsl:when test="count($seq1a/node()) != count($seq1) or count($seq2a/node()) != count($seq2)">
|
|
148
|
+
<xsl:sequence select="test:deep-equal($seq1a/node(), $seq2a/node(), $version)"/>
|
|
149
|
+
</xsl:when>
|
|
150
|
+
<xsl:otherwise>
|
|
151
|
+
<xsl:sequence select="false()"/>
|
|
152
|
+
</xsl:otherwise>
|
|
153
|
+
</xsl:choose>
|
|
154
|
+
</xsl:when>
|
|
155
|
+
<xsl:otherwise>
|
|
156
|
+
<xsl:sequence select="false()"/>
|
|
157
|
+
</xsl:otherwise>
|
|
158
|
+
</xsl:choose>
|
|
159
|
+
</xsl:variable>
|
|
160
|
+
<!-- Using a $param in @use-when does not work. TODO: What to do? At run time? -->
|
|
161
|
+
<!--xsl:message select="'DEEP-EQUAL: RESULT:', $result" use-when="$debug"/-->
|
|
162
|
+
<xsl:sequence select="$result"/>
|
|
163
|
+
</xsl:function>
|
|
164
|
+
|
|
165
|
+
<xsl:function name="test:item-deep-equal" as="xs:boolean">
|
|
166
|
+
<xsl:param name="item1" as="item()" />
|
|
167
|
+
<xsl:param name="item2" as="item()" />
|
|
168
|
+
<xsl:choose>
|
|
169
|
+
<xsl:when test="$item1 instance of node() and
|
|
170
|
+
$item2 instance of node()">
|
|
171
|
+
<xsl:sequence select="test:node-deep-equal($item1, $item2)" />
|
|
172
|
+
</xsl:when>
|
|
173
|
+
<xsl:when test="not($item1 instance of node()) and
|
|
174
|
+
not($item2 instance of node())">
|
|
175
|
+
<xsl:sequence select="deep-equal($item1, $item2)" />
|
|
176
|
+
</xsl:when>
|
|
177
|
+
<xsl:otherwise>
|
|
178
|
+
<xsl:sequence select="false()" />
|
|
179
|
+
</xsl:otherwise>
|
|
180
|
+
</xsl:choose>
|
|
181
|
+
</xsl:function>
|
|
182
|
+
|
|
183
|
+
<xsl:function name="test:node-deep-equal" as="xs:boolean">
|
|
184
|
+
<xsl:param name="node1" as="node()" />
|
|
185
|
+
<xsl:param name="node2" as="node()" />
|
|
186
|
+
<xsl:choose>
|
|
187
|
+
<xsl:when test="$node1 instance of document-node() and
|
|
188
|
+
$node2 instance of document-node()">
|
|
189
|
+
<xsl:variable name="children1" as="node()*"
|
|
190
|
+
select="test:sorted-children($node1)" />
|
|
191
|
+
<xsl:variable name="children2" as="node()*"
|
|
192
|
+
select="test:sorted-children($node2)" />
|
|
193
|
+
<xsl:sequence select="test:deep-equal($children1,
|
|
194
|
+
$children2)" />
|
|
195
|
+
</xsl:when>
|
|
196
|
+
<xsl:when test="$node1 instance of element() and
|
|
197
|
+
$node2 instance of element()">
|
|
198
|
+
<xsl:choose>
|
|
199
|
+
<xsl:when test="node-name($node1) eq node-name($node2)">
|
|
200
|
+
<xsl:variable name="atts1" as="attribute()*">
|
|
201
|
+
<xsl:perform-sort select="$node1/@*">
|
|
202
|
+
<xsl:sort select="namespace-uri(.)" />
|
|
203
|
+
<xsl:sort select="local-name(.)" />
|
|
204
|
+
</xsl:perform-sort>
|
|
205
|
+
</xsl:variable>
|
|
206
|
+
<xsl:variable name="atts2" as="attribute()*">
|
|
207
|
+
<xsl:perform-sort select="$node2/@*">
|
|
208
|
+
<xsl:sort select="namespace-uri(.)" />
|
|
209
|
+
<xsl:sort select="local-name(.)" />
|
|
210
|
+
</xsl:perform-sort>
|
|
211
|
+
</xsl:variable>
|
|
212
|
+
<xsl:choose>
|
|
213
|
+
<xsl:when test="test:deep-equal($atts1, $atts2)">
|
|
214
|
+
<xsl:choose>
|
|
215
|
+
<xsl:when test="$node1/text() = '...' and count($node1/node()) = 1">
|
|
216
|
+
<xsl:sequence select="true()" />
|
|
217
|
+
</xsl:when>
|
|
218
|
+
<xsl:otherwise>
|
|
219
|
+
<xsl:variable name="children1" as="node()*"
|
|
220
|
+
select="test:sorted-children($node1)" />
|
|
221
|
+
<xsl:variable name="children2" as="node()*"
|
|
222
|
+
select="test:sorted-children($node2)" />
|
|
223
|
+
<xsl:sequence select="test:deep-equal($children1,
|
|
224
|
+
$children2)" />
|
|
225
|
+
</xsl:otherwise>
|
|
226
|
+
</xsl:choose>
|
|
227
|
+
</xsl:when>
|
|
228
|
+
<xsl:otherwise>
|
|
229
|
+
<xsl:sequence select="false()" />
|
|
230
|
+
</xsl:otherwise>
|
|
231
|
+
</xsl:choose>
|
|
232
|
+
</xsl:when>
|
|
233
|
+
<xsl:otherwise>
|
|
234
|
+
<xsl:sequence select="false()" />
|
|
235
|
+
</xsl:otherwise>
|
|
236
|
+
</xsl:choose>
|
|
237
|
+
</xsl:when>
|
|
238
|
+
<xsl:when test="$node1 instance of text() and
|
|
239
|
+
$node1 = '...'">
|
|
240
|
+
<xsl:sequence select="true()" />
|
|
241
|
+
</xsl:when>
|
|
242
|
+
<xsl:when test="$node1 instance of text() and
|
|
243
|
+
$node2 instance of text()">
|
|
244
|
+
<!--
|
|
245
|
+
<xsl:choose>
|
|
246
|
+
<xsl:when test="not(normalize-space($node1)) and
|
|
247
|
+
not(normalize-space($node2))">
|
|
248
|
+
<xsl:sequence select="true()" />
|
|
249
|
+
</xsl:when>
|
|
250
|
+
<xsl:otherwise>
|
|
251
|
+
-->
|
|
252
|
+
<xsl:sequence select="string($node1) eq string($node2)" />
|
|
253
|
+
<!--
|
|
254
|
+
</xsl:otherwise>
|
|
255
|
+
</xsl:choose>
|
|
256
|
+
-->
|
|
257
|
+
</xsl:when>
|
|
258
|
+
<xsl:when test="($node1 instance of attribute() and
|
|
259
|
+
$node2 instance of attribute()) or
|
|
260
|
+
($node1 instance of processing-instruction() and
|
|
261
|
+
$node2 instance of processing-instruction())">
|
|
262
|
+
<xsl:sequence select="node-name($node1) eq node-name($node2) and
|
|
263
|
+
(string($node1) eq string($node2) or string($node1) = '...')" />
|
|
264
|
+
|
|
265
|
+
</xsl:when>
|
|
266
|
+
<xsl:when test="$node1 instance of comment() and
|
|
267
|
+
$node2 instance of comment()">
|
|
268
|
+
<xsl:sequence select="string($node1) eq string($node2) or string($node1) = '...'" />
|
|
269
|
+
</xsl:when>
|
|
270
|
+
<xsl:otherwise>
|
|
271
|
+
<xsl:sequence select="false()" />
|
|
272
|
+
</xsl:otherwise>
|
|
273
|
+
</xsl:choose>
|
|
274
|
+
</xsl:function>
|
|
275
|
+
|
|
276
|
+
<xsl:function name="test:sorted-children" as="node()*">
|
|
277
|
+
<xsl:param name="node" as="node()" />
|
|
278
|
+
<xsl:sequence
|
|
279
|
+
select="$node/child::node()
|
|
280
|
+
except ($node/text()[not(normalize-space(.))],
|
|
281
|
+
$node/test:message)" />
|
|
282
|
+
</xsl:function>
|
|
283
|
+
|
|
284
|
+
<xsl:template name="test:report-value">
|
|
285
|
+
<xsl:param name="value" required="yes" />
|
|
286
|
+
<xsl:param name="wrapper-name" select="'t:result'" />
|
|
287
|
+
<xsl:param name="wrapper-ns" select="'http://www.jenitennison.com/xslt/unit-testAlias'" />
|
|
288
|
+
<xsl:element name="{$wrapper-name}" namespace="{$wrapper-ns}">
|
|
289
|
+
<xsl:choose>
|
|
290
|
+
<xsl:when test="$value[1] instance of attribute()">
|
|
291
|
+
<xsl:attribute name="select">/*/(@* | node())</xsl:attribute>
|
|
292
|
+
<xsl:element name="temp" namespace="{$wrapper-ns}">
|
|
293
|
+
<xsl:copy-of select="$value" />
|
|
294
|
+
</xsl:element>
|
|
295
|
+
</xsl:when>
|
|
296
|
+
<xsl:when test="$value instance of node()+">
|
|
297
|
+
<xsl:choose>
|
|
298
|
+
<xsl:when test="$value instance of document-node()">
|
|
299
|
+
<xsl:attribute name="select">/</xsl:attribute>
|
|
300
|
+
</xsl:when>
|
|
301
|
+
<xsl:when test="not($value instance of element()+)">
|
|
302
|
+
<xsl:attribute name="select">/node()</xsl:attribute>
|
|
303
|
+
</xsl:when>
|
|
304
|
+
</xsl:choose>
|
|
305
|
+
<xsl:choose>
|
|
306
|
+
<xsl:when test="count($value//node()) > 1000">
|
|
307
|
+
<!-- Ensure that a unique file name is generated by creating a copy of the result (xspec issue #67). -->
|
|
308
|
+
<xsl:variable name="value-copy">
|
|
309
|
+
<xsl:copy-of select="$value"/>
|
|
310
|
+
</xsl:variable>
|
|
311
|
+
<xsl:variable name="href" as="xs:string" select="concat(generate-id($value-copy[1]), '.xml')" />
|
|
312
|
+
<xsl:attribute name="href" select="$href" />
|
|
313
|
+
<xsl:result-document href="{$href}" format="x:report">
|
|
314
|
+
<xsl:sequence select="$value" />
|
|
315
|
+
</xsl:result-document>
|
|
316
|
+
</xsl:when>
|
|
317
|
+
<xsl:otherwise>
|
|
318
|
+
<xsl:apply-templates select="$value" mode="test:report-value" />
|
|
319
|
+
</xsl:otherwise>
|
|
320
|
+
</xsl:choose>
|
|
321
|
+
</xsl:when>
|
|
322
|
+
<xsl:otherwise>
|
|
323
|
+
<xsl:attribute name="select">
|
|
324
|
+
<xsl:choose>
|
|
325
|
+
<xsl:when test="empty($value)">()</xsl:when>
|
|
326
|
+
<xsl:when test="$value instance of item()">
|
|
327
|
+
<xsl:value-of select="test:report-atomic-value($value)" />
|
|
328
|
+
</xsl:when>
|
|
329
|
+
<xsl:otherwise>
|
|
330
|
+
<xsl:text>(</xsl:text>
|
|
331
|
+
<xsl:for-each select="$value">
|
|
332
|
+
<xsl:value-of select="test:report-atomic-value(.)" />
|
|
333
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
|
334
|
+
</xsl:for-each>
|
|
335
|
+
<xsl:text>)</xsl:text>
|
|
336
|
+
</xsl:otherwise>
|
|
337
|
+
</xsl:choose>
|
|
338
|
+
</xsl:attribute>
|
|
339
|
+
</xsl:otherwise>
|
|
340
|
+
</xsl:choose>
|
|
341
|
+
</xsl:element>
|
|
342
|
+
</xsl:template>
|
|
343
|
+
|
|
344
|
+
<xsl:template match="node()" mode="test:report-value">
|
|
345
|
+
<xsl:copy>
|
|
346
|
+
<xsl:copy-of select="@*" />
|
|
347
|
+
<xsl:apply-templates mode="test:report-value" />
|
|
348
|
+
</xsl:copy>
|
|
349
|
+
</xsl:template>
|
|
350
|
+
|
|
351
|
+
<xsl:template match="text()[not(normalize-space())]" mode="test:report-value">
|
|
352
|
+
<t:ws><xsl:value-of select="." /></t:ws>
|
|
353
|
+
</xsl:template>
|
|
354
|
+
|
|
355
|
+
<xsl:function name="test:report-atomic-value" as="xs:string">
|
|
356
|
+
<xsl:param name="value" as="item()" />
|
|
357
|
+
<xsl:choose>
|
|
358
|
+
<xsl:when test="$value instance of xs:string">
|
|
359
|
+
<xsl:value-of select="concat('''',
|
|
360
|
+
replace($value, '''', ''''''),
|
|
361
|
+
'''')" />
|
|
362
|
+
</xsl:when>
|
|
363
|
+
|
|
364
|
+
<!-- Numeric literals: http://www.w3.org/TR/xpath20/#id-literals -->
|
|
365
|
+
<!-- Check integer before decimal, because of derivation -->
|
|
366
|
+
<xsl:when test="$value instance of xs:integer">
|
|
367
|
+
<xsl:value-of select="$value" />
|
|
368
|
+
</xsl:when>
|
|
369
|
+
<xsl:when test="$value instance of xs:decimal">
|
|
370
|
+
<xsl:value-of>
|
|
371
|
+
<xsl:variable as="xs:string" name="decimal-string" select="string($value)"/>
|
|
372
|
+
<xsl:sequence select="$decimal-string"/>
|
|
373
|
+
<xsl:sequence select="'.0'[not(contains($decimal-string,'.'))]"/>
|
|
374
|
+
</xsl:value-of>
|
|
375
|
+
</xsl:when>
|
|
376
|
+
<!-- xs:double
|
|
377
|
+
Just defer it to xsl:otherwise. Justifications below.
|
|
378
|
+
- Expression is a bit complicated: http://www.w3.org/TR/xpath-functions/#casting-to-string
|
|
379
|
+
- Not used as frequently as integer
|
|
380
|
+
- xsl:otherwise will return valid expression. It's just some more verbose than numeric literal. -->
|
|
381
|
+
|
|
382
|
+
<xsl:when test="$value instance of xs:QName">
|
|
383
|
+
<xsl:value-of
|
|
384
|
+
select="concat('QName(''', namespace-uri-from-QName($value),
|
|
385
|
+
''', ''', if (prefix-from-QName($value))
|
|
386
|
+
then concat(prefix-from-QName($value), ':')
|
|
387
|
+
else '',
|
|
388
|
+
local-name-from-QName($value), ''')')" />
|
|
389
|
+
</xsl:when>
|
|
390
|
+
<xsl:otherwise>
|
|
391
|
+
<xsl:variable name="type" select="test:atom-type($value)" />
|
|
392
|
+
<xsl:value-of select="concat($type, '(',
|
|
393
|
+
test:report-atomic-value(string($value)), ')')" />
|
|
394
|
+
</xsl:otherwise>
|
|
395
|
+
</xsl:choose>
|
|
396
|
+
</xsl:function>
|
|
397
|
+
|
|
398
|
+
<xsl:function name="test:atom-type" as="xs:string">
|
|
399
|
+
<xsl:param name="value" as="xs:anyAtomicType" />
|
|
400
|
+
<xsl:choose>
|
|
401
|
+
<!-- Grouped as the spec does.
|
|
402
|
+
Groups are in the reversed order so that the derived types are before the primitive types,
|
|
403
|
+
otherwise xs:integer is recognised as xs:decimal, xs:yearMonthDuration as xs:duration, and so on. -->
|
|
404
|
+
|
|
405
|
+
<!-- http://www.w3.org/TR/xslt20/#built-in-types
|
|
406
|
+
Every XSLT 2.0 processor includes the following named type definitions in the in-scope schema components: -->
|
|
407
|
+
|
|
408
|
+
<!-- * The following types defined in [XPath 2.0] -->
|
|
409
|
+
<xsl:when test="$value instance of xs:yearMonthDuration">xs:yearMonthDuration</xsl:when>
|
|
410
|
+
<xsl:when test="$value instance of xs:dayTimeDuration">xs:dayTimeDuration</xsl:when>
|
|
411
|
+
<!-- xs:anyAtomicType: Abstract -->
|
|
412
|
+
<!-- xs:untyped: Not atomic -->
|
|
413
|
+
<xsl:when test="$value instance of xs:untypedAtomic">xs:untypedAtomic</xsl:when>
|
|
414
|
+
|
|
415
|
+
<!-- * The types xs:anyType and xs:anySimpleType. -->
|
|
416
|
+
<!-- Not atomic -->
|
|
417
|
+
|
|
418
|
+
<!-- * The derived atomic type xs:integer defined in [XML Schema Part 2]. -->
|
|
419
|
+
<xsl:when test="$value instance of xs:integer">xs:integer</xsl:when>
|
|
420
|
+
|
|
421
|
+
<!-- * All the primitive atomic types defined in [XML Schema Part 2], with the exception of xs:NOTATION. -->
|
|
422
|
+
<xsl:when test="$value instance of xs:string">xs:string</xsl:when>
|
|
423
|
+
<xsl:when test="$value instance of xs:boolean">xs:boolean</xsl:when>
|
|
424
|
+
<xsl:when test="$value instance of xs:decimal">xs:decimal</xsl:when>
|
|
425
|
+
<xsl:when test="$value instance of xs:double">xs:double</xsl:when>
|
|
426
|
+
<xsl:when test="$value instance of xs:float">xs:float</xsl:when>
|
|
427
|
+
<xsl:when test="$value instance of xs:date">xs:date</xsl:when>
|
|
428
|
+
<xsl:when test="$value instance of xs:time">xs:time</xsl:when>
|
|
429
|
+
<xsl:when test="$value instance of xs:dateTime">xs:dateTime</xsl:when>
|
|
430
|
+
<xsl:when test="$value instance of xs:duration">xs:duration</xsl:when>
|
|
431
|
+
<xsl:when test="$value instance of xs:QName">xs:QName</xsl:when>
|
|
432
|
+
<xsl:when test="$value instance of xs:anyURI">xs:anyURI</xsl:when>
|
|
433
|
+
<xsl:when test="$value instance of xs:gDay">xs:gDay</xsl:when>
|
|
434
|
+
<xsl:when test="$value instance of xs:gMonthDay">xs:gMonthDay</xsl:when>
|
|
435
|
+
<xsl:when test="$value instance of xs:gMonth">xs:gMonth</xsl:when>
|
|
436
|
+
<xsl:when test="$value instance of xs:gYearMonth">xs:gYearMonth</xsl:when>
|
|
437
|
+
<xsl:when test="$value instance of xs:gYear">xs:gYear</xsl:when>
|
|
438
|
+
<xsl:when test="$value instance of xs:base64Binary">xs:base64Binary</xsl:when>
|
|
439
|
+
<xsl:when test="$value instance of xs:hexBinary">xs:hexBinary</xsl:when>
|
|
440
|
+
|
|
441
|
+
<xsl:otherwise>xs:anyAtomicType</xsl:otherwise>
|
|
442
|
+
</xsl:choose>
|
|
443
|
+
</xsl:function>
|
|
444
|
+
|
|
445
|
+
<xsl:function name="msxsl:node-set" as="item()*">
|
|
446
|
+
<xsl:param name="rtf" as="item()*" />
|
|
447
|
+
<xsl:sequence select="$rtf" />
|
|
448
|
+
</xsl:function>
|
|
449
|
+
|
|
450
|
+
</xsl:stylesheet>
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
454
|
+
<!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
|
|
455
|
+
<!-- -->
|
|
456
|
+
<!-- Copyright (c) 2008, 2010 Jeni Tennsion -->
|
|
457
|
+
<!-- -->
|
|
458
|
+
<!-- The contents of this file are subject to the MIT License (see the URI -->
|
|
459
|
+
<!-- http://www.opensource.org/licenses/mit-license.php for details). -->
|
|
460
|
+
<!-- -->
|
|
461
|
+
<!-- Permission is hereby granted, free of charge, to any person obtaining -->
|
|
462
|
+
<!-- a copy of this software and associated documentation files (the -->
|
|
463
|
+
<!-- "Software"), to deal in the Software without restriction, including -->
|
|
464
|
+
<!-- without limitation the rights to use, copy, modify, merge, publish, -->
|
|
465
|
+
<!-- distribute, sublicense, and/or sell copies of the Software, and to -->
|
|
466
|
+
<!-- permit persons to whom the Software is furnished to do so, subject to -->
|
|
467
|
+
<!-- the following conditions: -->
|
|
468
|
+
<!-- -->
|
|
469
|
+
<!-- The above copyright notice and this permission notice shall be -->
|
|
470
|
+
<!-- included in all copies or substantial portions of the Software. -->
|
|
471
|
+
<!-- -->
|
|
472
|
+
<!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -->
|
|
473
|
+
<!-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
|
|
474
|
+
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.-->
|
|
475
|
+
<!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -->
|
|
476
|
+
<!-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -->
|
|
477
|
+
<!-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -->
|
|
478
|
+
<!-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
|
|
479
|
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|