From b63b3735ef3668a387c59bf96867d3838a7e674c Mon Sep 17 00:00:00 2001 From: Wendell Piez Date: Fri, 30 Aug 2024 10:08:04 -0400 Subject: [PATCH] Testing and repairs including JSON Schema generation enhancements (#119) * produce-xml-converter.xsl: XSpec tests and minor XSLT improvements (#87) * XSpec tests and minor XSLT improvements * JSON Schema generation improvements (#108) Refactoring submodules; XProc-based testing; XSpec testing of JSON Schema generation; improvements to JSON Schema generation - addressing #105 also #2007. * June 2024 Integration (#118) Integrating branches * June 2024 in-progress merge (#120) Includes updates to unit testing, Inspector XSLT, JSON Schema (#105) and others * More testing (#122) Mostly testing support - * Adding Makefile in compose phase to run XSpec - presently showing errors! * Extending and reorganizing testing, including removing temporary artifacts from git * Adding subpipeline mistakenly omitted from the last PR * New Makefile for testing/tinydata * Mending XSpecs testing Metaschema composition (regression protection); also a new tinydata sample. * Update src/testing/tinydata/tiny-data/terms-of-art.xml (AJ Stein) Co-authored-by: Wendell Piez Co-authored-by: Amanda Galtman <40716346+galtm@users.noreply.github.com> Co-authored-by: A.J. Stein --- .github/workflows/test.yml | 2 +- .gitignore | 4 + .gitmodules | 8 +- README.md | 4 +- TESTING.md | 1 - src/Makefile | 4 + src/common/metaschema-ws-strip.xsl | 27 + src/compose/Makefile | 44 + src/compose/testing/1_collected/collect.xspec | 2 +- .../working_metaschema-COLLECTED.xml | 8 +- .../4_pruning/prune-unused-definitions.xspec | 2 +- src/converter-gen/Makefile | 18 +- .../issue_235_regression-metaschema.xml | 0 .../issue_235_regression.xspec | 4 +- .../assessment-plan-reduce-map-output.xml | 16671 ++++++++++++++++ .../profile-reduce-map-output.xml | 7009 +++++++ .../computer-build-xml-converter.xsl | 12 + .../produce-xml-converter-json-usage.xspec | 84 + .../xml-to-json/produce-xml-converter.xspec | 1566 ++ .../xml-to-json/test-helper-xml-to-json.xsl | 37 + .../xml-to-json/produce-xml-converter.xsl | 207 +- src/metapath/readme.md | 14 + src/schema-gen/InspectorXSLT/Makefile | 4 +- .../testing/OSCAL-INSPECTOR-XSLT.xpl | 65 + .../testing/TEST-INSPECTOR-RUNTIME.xpl | 2 +- .../testing/current/computer_inspector.xsl | 2360 +++ .../current/computer_metaschema-inspector.xsl | 3 +- .../current/computer_metaschema-schema.xsd | 169 +- .../current/computer_metaschema-xmlschema.xsd | 952 + .../testing/current/tiny_inspector.xsl | 889 + .../current/tiny_metaschema-inspector.xsl | 261 +- .../current/tiny_metaschema-schema.xsd | 55 +- .../current/tiny_metaschema-xmlschema.xsd | 377 + .../tiny_metaschema_COMPOSED-metaschema.xml | 242 + .../generate-oscal-catalog-inspector.sh | 29 + .../testing/refresh-computer-inspector.sh | 14 +- .../testing/refresh-test-inspectors.sh | 14 +- .../testing/smoketest-computer-inspector.sh | 12 +- .../xspec-patterns.xspec | 1 + src/schema-gen/JSON-schema/Makefile | 52 + src/schema-gen/JSON-schema/choice-split.xsl | 85 + .../JSON-schema/make-json-schema-metamap.xsl | 89 +- src/schema-gen/JSON-schema/testing.md | 73 + .../choice-splitting.xspec | 229 + .../metamap-test.xspec | 76 + .../jsonschema-gen-test.xspec | 49 + src/schema-gen/METASCHEMA-ALL-VALIDATORS.xpl | 92 + src/schema-gen/Makefile | 15 +- src/schema-gen/XSD/make-metaschema-xsd.xsl | 2 + src/testing/Makefile | 61 + src/testing/models_metaschema.xml | 8 +- src/testing/readme.md | 48 + src/testing/tinydata/.gitignore | 2 + src/testing/tinydata/Makefile | 58 + src/testing/tinydata/TINYDATA-MAKE-JSON.xpl | 47 + .../tinydata/TINYDATA-XSD-VALIDATE.xpl | 196 + src/testing/tinydata/readme.md | 62 + .../tinydata/refresh-tiny-converters.sh | 73 + src/testing/tinydata/refresh-tiny-schemas.sh | 95 + src/testing/tinydata/tiny-data/bigbadtiny.xml | 30 + .../tinydata/tiny-data/terms-of-art.xml | 51 + src/testing/tinydata/tiny-data/tiny1.xml | 22 + .../tinydata/tiny-json-validate-xp3.sh | 27 + src/testing/tinydata/tiny-xsd-validate-set.sh | 45 + .../tinydata/tiny_json-schema-corrected.xml | 346 + src/testing/tinydata/tiny_metaschema.xml | 163 + src/testing/tinydata/tinydata-samples.xpl | 33 + .../tinydata/tinydata_xml-converter.xsl | 17 + src/testing/tinydata/validate-tiny-json.xp3 | 28 + src/util/make-plain-CSS.xsl | 2 +- src/validate/METASCHEMA-SCHXSLT-VALIDATE.xpl | 6 +- src/validate/METASCHEMA-VALIDATE.xpl | 52 - src/validate/METASCHEMA-XSD-VALIDATE.xpl | 48 + src/validate/Makefile | 15 +- .../mvn-metaschema-xsd-validate-xpl.sh | 26 + src/validate/svrl-reduce.xsl | 2 +- support/download-jars.sh | 65 + support/pattern-test.xsl | 23 + support/refresh-lib.sh | 34 + support/schxslt | 2 +- support/xslt3-functions | 1 + support/xspec | 1 - support/xspec-dev/XSPEC-BATCH.xsl | 334 - support/xspec-dev/XSPEC-SINGLE.xsl | 100 - .../xspec-dev/mvn-saxon-xspec-batch-quiet.sh | 80 - support/xspec-dev/mvn-saxon-xspec-batch.sh | 79 - support/xspec-dev/mvn-saxon-xspec-html.sh | 36 - support/xspec-dev/mvn-xproc-xspec-html.sh | 33 - support/xspec-dev/planning.md | 20 - support/xspec-dev/readme.md | 175 - support/xspec-dev/testing.md | 28 - support/xspec-dev/testing/copy_me.xsl | 9 - support/xspec-dev/testing/iso8601.ixml | 171 - support/xspec-dev/testing/ixml-demo.xsl | 57 - support/xspec-dev/testing/ixml-parsing.xspec | 92 - .../testing/mvn-xproc-xspec-test-batch.sh | 32 - .../xspec-dev/testing/test/xspec-basicR.xspec | 47 - support/xspec-dev/testing/xspec-basic.xspec | 47 - support/xspec-dev/testing/xspec-shell.xspec | 35 - .../xspec-dev/testing/xspec-test-batch.xpl | 75 - support/xspec-dev/xspec-assurance.sch | 13 - support/xspec-dev/xspec-batch-report.xpl | 98 - support/xspec-dev/xspec-mx-html-report.xsl | 538 - support/xspec-dev/xspec-single-report.xpl | 85 - .../xspec-single-xspec-repo-report.xpl | 78 - support/xspec-dev/xspec-summarize.xsl | 50 - support/xspec-dev/xspec-summary-reduce.xsl | 68 - 107 files changed, 33193 insertions(+), 2815 deletions(-) create mode 100644 src/common/metaschema-ws-strip.xsl create mode 100644 src/compose/Makefile rename src/{testing => converter-gen}/issue_235_regression-metaschema.xml (100%) rename src/{testing => converter-gen}/issue_235_regression.xspec (98%) create mode 100644 src/converter-gen/testing/definition-maps/assessment-plan-reduce-map-output.xml create mode 100644 src/converter-gen/testing/definition-maps/profile-reduce-map-output.xml create mode 100644 src/converter-gen/testing/xml-converters/computer-build-xml-converter.xsl create mode 100644 src/converter-gen/testing/xml-to-json/produce-xml-converter-json-usage.xspec create mode 100644 src/converter-gen/testing/xml-to-json/test-helper-xml-to-json.xsl create mode 100644 src/schema-gen/InspectorXSLT/testing/OSCAL-INSPECTOR-XSLT.xpl create mode 100644 src/schema-gen/InspectorXSLT/testing/current/computer_inspector.xsl create mode 100644 src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-xmlschema.xsd create mode 100644 src/schema-gen/InspectorXSLT/testing/current/tiny_inspector.xsl create mode 100644 src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-xmlschema.xsd create mode 100644 src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema_COMPOSED-metaschema.xml create mode 100644 src/schema-gen/InspectorXSLT/testing/generate-oscal-catalog-inspector.sh create mode 100644 src/schema-gen/JSON-schema/Makefile create mode 100644 src/schema-gen/JSON-schema/choice-split.xsl create mode 100644 src/schema-gen/JSON-schema/testing.md create mode 100644 src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/choice-splitting.xspec create mode 100644 src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/metamap-test.xspec create mode 100644 src/schema-gen/JSON-schema/testing/tests/jsonschemagen-runtime-xspec/jsonschema-gen-test.xspec create mode 100644 src/schema-gen/METASCHEMA-ALL-VALIDATORS.xpl create mode 100644 src/testing/Makefile create mode 100644 src/testing/readme.md create mode 100644 src/testing/tinydata/.gitignore create mode 100644 src/testing/tinydata/Makefile create mode 100644 src/testing/tinydata/TINYDATA-MAKE-JSON.xpl create mode 100644 src/testing/tinydata/TINYDATA-XSD-VALIDATE.xpl create mode 100644 src/testing/tinydata/readme.md create mode 100644 src/testing/tinydata/refresh-tiny-converters.sh create mode 100644 src/testing/tinydata/refresh-tiny-schemas.sh create mode 100644 src/testing/tinydata/tiny-data/bigbadtiny.xml create mode 100644 src/testing/tinydata/tiny-data/terms-of-art.xml create mode 100644 src/testing/tinydata/tiny-data/tiny1.xml create mode 100644 src/testing/tinydata/tiny-json-validate-xp3.sh create mode 100644 src/testing/tinydata/tiny-xsd-validate-set.sh create mode 100644 src/testing/tinydata/tiny_json-schema-corrected.xml create mode 100644 src/testing/tinydata/tiny_metaschema.xml create mode 100644 src/testing/tinydata/tinydata-samples.xpl create mode 100644 src/testing/tinydata/tinydata_xml-converter.xsl create mode 100644 src/testing/tinydata/validate-tiny-json.xp3 delete mode 100644 src/validate/METASCHEMA-VALIDATE.xpl create mode 100644 src/validate/METASCHEMA-XSD-VALIDATE.xpl create mode 100644 src/validate/mvn-metaschema-xsd-validate-xpl.sh create mode 100644 support/download-jars.sh create mode 100644 support/pattern-test.xsl create mode 100644 support/refresh-lib.sh create mode 160000 support/xslt3-functions delete mode 160000 support/xspec delete mode 100644 support/xspec-dev/XSPEC-BATCH.xsl delete mode 100644 support/xspec-dev/XSPEC-SINGLE.xsl delete mode 100644 support/xspec-dev/mvn-saxon-xspec-batch-quiet.sh delete mode 100755 support/xspec-dev/mvn-saxon-xspec-batch.sh delete mode 100755 support/xspec-dev/mvn-saxon-xspec-html.sh delete mode 100755 support/xspec-dev/mvn-xproc-xspec-html.sh delete mode 100644 support/xspec-dev/planning.md delete mode 100644 support/xspec-dev/readme.md delete mode 100644 support/xspec-dev/testing.md delete mode 100644 support/xspec-dev/testing/copy_me.xsl delete mode 100644 support/xspec-dev/testing/iso8601.ixml delete mode 100644 support/xspec-dev/testing/ixml-demo.xsl delete mode 100644 support/xspec-dev/testing/ixml-parsing.xspec delete mode 100644 support/xspec-dev/testing/mvn-xproc-xspec-test-batch.sh delete mode 100644 support/xspec-dev/testing/test/xspec-basicR.xspec delete mode 100644 support/xspec-dev/testing/xspec-basic.xspec delete mode 100644 support/xspec-dev/testing/xspec-shell.xspec delete mode 100644 support/xspec-dev/testing/xspec-test-batch.xpl delete mode 100644 support/xspec-dev/xspec-assurance.sch delete mode 100644 support/xspec-dev/xspec-batch-report.xpl delete mode 100644 support/xspec-dev/xspec-mx-html-report.xsl delete mode 100644 support/xspec-dev/xspec-single-report.xpl delete mode 100644 support/xspec-dev/xspec-single-xspec-repo-report.xpl delete mode 100644 support/xspec-dev/xspec-summarize.xsl delete mode 100644 support/xspec-dev/xspec-summary-reduce.xsl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ac6e0ee9..8314335d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: true + submodules: "recursive" fetch-depth: 0 - uses: actions/setup-java@v3 with: diff --git a/.gitignore b/.gitignore index 3cc589cb..73a1e16d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,7 @@ # test outputs src/**/test_output/ + +# downloaded miscellaneous + +support/lib/* \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index c3cb9c7f..8b1c4076 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,13 +1,11 @@ -[submodule "support/xspec"] - path = support/xspec - url = https://github.com/xspec/xspec.git [submodule "support/metaschema"] path = support/metaschema url = https://github.com/usnistgov/metaschema.git branch = develop fetchRecurseSubmodules = false +[submodule "support/xslt3-functions"] + path = support/xslt3-functions + url = https://github.com/usnistgov/xslt3-functions.git [submodule "support/schxslt"] path = support/schxslt url = https://github.com/schxslt/schxslt.git -[submodule "metaschema"] - url = https://github.com/usnistgov/metaschema.git diff --git a/README.md b/README.md index d8129dd6..566d47af 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,9 @@ Additionally, we care about, but do not prioritize: Formerly housed in the [Metaschema repository](https://github.com/usnistgov/metaschema), this code base traces the history of development of the Metaschema concept in the context of the OSCAL project. It was originally conceived as a demonstration and proof of concept, providing a bridge enabling JSON- and XML-based development in parallel over common problem sets and common data. Success in this effort led to a determination that multiple implementations of a platform-independent specification were needed, at which point this implementation was carved out into its own repository. -### Project sunset +### Maturity and project sunset + +Software in this repository remains 'experimental' in status until it can be demonstrated with public conformance testing, which in turn depends on the maturity of the Metaschema initiative. The NIST team has no long-term plan to maintain this project outside the context of the initiatives it supports, [OSCAL](https://pages.nist.gov/OSCAL) and [Metaschema](https://pages.nist.gov/metaschema), while we reserve the right to change and adapt to community needs in alignment with NIST's mission. A project goal is to enable the stabilization and socialization of the Metaschema technology, as evidenced by the use and support of *other* Metaschema implementations. diff --git a/TESTING.md b/TESTING.md index 2b2f7b0a..e165cbf2 100644 --- a/TESTING.md +++ b/TESTING.md @@ -40,7 +40,6 @@ Currently we are emulating and re-engineering some specific XSpec capabilities i These efforts are focused on producing and refining XSpec runtimes for various use cases and scenarios with specialized requirements faced by this project, such as arbitrary batching and iXML support. Tools we develop here are released under the same terms as Metaschema-XSLT (as open-source software). - ## Test-driven development Almost all testing in this repository falls into the category of either XSLT transformations, or runtimes that embed transformations. diff --git a/src/Makefile b/src/Makefile index 71cdcad9..8253a313 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,6 +10,10 @@ dirs:=$(shell find '.' ! -wholename ./Makefile -name 'Makefile' -printf "%h\n") test: ## Run all tests $(call FOREACH_MAKE,$@,$(dirs)) +.PHONY: pre-checks +pre-checks: ## Run all "pre checks", enforcing validation contracts across input artifacts + $(call FOREACH_MAKE_OPTIONAL,$@,$(dirs)) + .PHONY: smoke-test smoke-test: ## Run all "smoke tests", establishing a baseline of sanity across the project $(call FOREACH_MAKE_OPTIONAL,$@,$(dirs)) diff --git a/src/common/metaschema-ws-strip.xsl b/src/common/metaschema-ws-strip.xsl new file mode 100644 index 00000000..8896923e --- /dev/null +++ b/src/common/metaschema-ws-strip.xsl @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/compose/Makefile b/src/compose/Makefile new file mode 100644 index 00000000..ba43d82e --- /dev/null +++ b/src/compose/Makefile @@ -0,0 +1,44 @@ +include ../testing/make_common.mk + +# INCLUDES: +# unit-test - unit testing - XSLT production templates for InspectorXSLT +# spec-test - specification conformance testing - functional runtime tests of the generated XSLT +# xspec - run XSpec tests in designated folder +# clean - clean up designated output folder + +# for smoke testing see ../Makefile + +# tbd - 'field testing' applying result JSON Schema to known 'working and broken' instances + +module_path:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +output_folder:=$(module_path)/test_output +xspec_script=$(realpath $(module_path)/../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch-quiet.sh) +xspec_ci_script=$(realpath $(module_path)/../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch.sh) +folder=. + +.PHONY: test +test: unit-test ## Run all tests + +# just unit-test for now ... + +.PHONY: unit-test +unit-test: ## Run all *.xspec in testing folder (and subfolders) + LOGFILE="$(output_folder)/composition-xspec.log" $(xspec_ci_script) \ + "folder=$(module_path)/testing" \ + "report-to=$(output_folder)/composition-xspec_report.html" \ + "junit-to=$(output_folder)/composition-xspec_junit-report.xml" \ + "stop-on-error=yes" \ + "recurse=yes" + +.PHONY: xspec +xspec: ## Run all *.xspec in a designated folder, quietly - use folder=[folder] + LOGFILE="$(output_folder)/xspec-tests.log" $(xspec_script) \ + "baseURI=file:$(module_path)/" \ + "folder=$(folder)" \ + "report-to=$(output_folder)" \ + "stop-on-error=no" \ + "recurse=yes" + +.PHONY: clean +clean: ## Remove test output + rm -fr $(output_folder)/* \ No newline at end of file diff --git a/src/compose/testing/1_collected/collect.xspec b/src/compose/testing/1_collected/collect.xspec index d781929f..62081dc4 100644 --- a/src/compose/testing/1_collected/collect.xspec +++ b/src/compose/testing/1_collected/collect.xspec @@ -2,7 +2,7 @@ - + diff --git a/src/converter-gen/testing/definition-maps/assessment-plan-reduce-map-output.xml b/src/converter-gen/testing/definition-maps/assessment-plan-reduce-map-output.xml new file mode 100644 index 00000000..2d9925bb --- /dev/null +++ b/src/converter-gen/testing/definition-maps/assessment-plan-reduce-map-output.xml @@ -0,0 +1,16671 @@ + + + + OSCAL Assessment Plan Model + 1.0.4 + oscal-ap + http://csrc.nist.gov/ns/oscal/1.0 + http://csrc.nist.gov/ns/oscal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + The link identifies the authoritative location for this file. Defined by RFC 6596. + The link identifies an alternative location or format for this file. Defined by the HTML Living Standard + + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + + + + + + + + + + A Digital Object Identifier (DOI); use is preferred, since this allows for retrieval of a full bibliographic record. + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A home address. + A work address. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A home phone number. + An office phone number. + A mobile phone number. + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + Characterizes the kind of location. + + + A location that contains computing assets. A class can be used to indicate the sub-type of data-center as primary or alternate. + + + The location is a data-center used for normal operations. + The location is a data-center used for fail-over or backup operations. + + + + + + + + + + + An individual. + A group of individuals formed for a specific purpose. + + + + + + + + + + + + + + + The identifier is Open Researcher and Contributor ID (ORCID). + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + A home phone number. + An office phone number. + A mobile phone number. + + + + + + + + + + + + + A home address. + A work address. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A mail stop associated with the party. + The name or number of the party's office. + The formal job title of a person. + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates the organization that created this content. + Indicates the organization that prepared this content. + Indicates the organization for which this content was created. + Indicates the organization responsible for all content represented in the "document". + Indicates the organization to contact for questions or support related to this content. + + + The value identifies a comma-seperated listing of keywords associated with this content. These keywords may be used as search terms for indexing and other applications. + + + The link identifies the authoritative location for this file. Defined by RFC 6596. + The link identifies an alternative location or format for this file. Defined by the HTML Living Standard + + This link identifies a resource containing the latest version in the version history. Defined by RFC 5829. + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + + + + + + + + + + + + + + + + + The system as a whole. + An external system, which may be a leveraged system or the other side of an interconnection. + A connection to something outside this system. + Any software, operating system, or firmware. + A physical device. + A service that may provide APIs. + An enforceable policy. + A tangible asset used to provide physical protections or countermeasures. + A list of steps or actions to take to achieve some end result. + An applicable plan. + Any guideline or recommendation. + Any organizational or industry standard. + An external assessment performed on some other component, that has been validated by a third-party. + A physical or virtual network. + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + The component is being designed, developed, or implemented. + The component is currently operational and is available for use in the system. + The component is no longer operational. + Some other state. + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Transmission Control Protocol + User Datagram Protocol + + + + + + + + It is a best practice to provide a UUID. + + + + + + + + + + Relative placement of component ('internal' or 'external') to the system. + UUID of the related leveraged-authorization assembly in this SSP. + UUID of the component as it was assigned in the leveraged system's SSP. + Simple indication of the asset's function, such as Router, Storage Array, DNS Server. + An organizationally specific identifier that is used to uniquely identify a logical or tangible item by the organization that owns the item. + An asset tag assigned by the organization responsible for maintaining the logical or tangible item. + Identifies whether the asset is publicly accessible (yes/no) + Identifies whether the asset is virtualized (yes/no) + Virtual LAN identifier of the asset. + The network identifier of the asset. + A human-readable label for the parent context. + An alternative identifier, whose value is easily sortable among other such values in the document. + The name of the baseline configuration for the asset. + Can the asset be check with an authenticated scan? (yes/no) + The function provided by the asset for the system. + The version of the component. + The specific patch level of the component. + The model of the component. + The date the component was released, such as a software release date or policy publication date. + Used with component-type='validation' to provide a well-known name for a kind of validation. + Used with component-type='validation' to indicate the validating body's assigned identifier for their validation of this component. + + + A reference to another component that this component has a dependency on. + A reference to another component of component-type=validation, that is a validation (e.g., FIPS 140-2) for this component + A pointer to a validation record (e.g., FIPS 140-2) or other compliance information. + A reference to the baseline template used to configure the asset. + This service is used by the referenced component identifier. + A link to the system security plan of the external system. + This component uses the network provided by the identified network component. + + + Accountable for ensuring the asset is managed in accordance with organizational policies and procedures. + Responsible for administering a set of assets. + Members of the security operations center (SOC). + Members of the network operations center (NOC). + Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions. + Responsible for providing information and support to users. + Responsible for the configuration management processes governing changes to the asset. + Responsible for the creation and maintenance of a component. + Organization responsible for providing the component, if this is different from the "maintainer" (e.g., a reseller). + + + System software that manages computer hardware, software resources, and provides common services for computer programs. + An electronic collection of data, or information, that is specially organized for rapid search and retrieval. + A system that delivers content or services to end users over the Internet or an intranet. + A system that resolves domain names to internet protocol (IP) addresses. + A computer system that sends and receives electronic mail messages. + A system that stores, organizes and provides access to directory information in order to unify network resources. + A private branch exchange (PBX) provides a a private telephone switchboard. + A network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. + A physical or virtual networking device that forwards data packets between computer networks. + A physical or virtual networking device that connects devices within a computer network by using packet switching to receive and forward data to the destination device. + A consolidated, block-level data storage capability. + A physical or virtual machine that centralizes hardware, software, or services for a specific purpose. + + + The component allows an authenticated scan. + The component does not allow an authenticated scan. + + + The component is publicly accessible. + The component is not publicly accessible. + + + The component is virtualized. + The component is not virtualized. + + + The component is implemented within the system boundary. + The component is implemented outside the system boundary. + + + + + + + + The name of the company or organization + + + A link to an online information provided by the authorizing body. + + + If a "software" component-type, the identifier, such as a SWID tag, for the software component. + + + This service is provided by the referenced component identifier. + This service is used by the referenced component identifier. + + + + Title of the Interconnection Security Agreement (ISA). + Date of the Interconnection Security Agreement (ISA). + The name of the remote interconnected system. + An Internet Protocol Version 4 interconnection address + An Internet Protocol Version 6 interconnection address + An Internet Protocol Version 6 interconnection address + + + The identified IP address is for this system. + The identified IP address is for the remote system to which this system is connected. + + + A link to the system interconnection agreement. + + + Interconnection Security Agreement (ISA) point of contact (POC) for this system. + Interconnection Security Agreement (ISA) point of contact (POC) for the remote interconnected system. + Interconnection Security Agreement (ISA) authorizing official for this system. + Interconnection Security Agreement (ISA) authorizing official for the remote interconnected system. + + + + + + Data from the remote system flows into this system. + Data from this system flows to the remote system. + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The version of the component. + The specific patch level of the component. + The model of the component. + The date the component was released, such as a software release date or policy publication date. + Used with component-type='validation' to provide a well-known name for a kind of validation. + Used with component-type='validation' to indicate the validating body's assigned identifier for their validation of this component. + Simple indication of the asset's function, such as Router, Storage Array, DNS Server. + An organizationally specific identifier that is used to uniquely identify a logical or tangible item by the organization that owns the item. + An asset tag assigned by the organization responsible for maintaining the logical or tangible item. + Identifies whether the asset is publicly accessible (yes/no) + Identifies whether the asset is virtualized (yes/no) + Virtual LAN identifier of the asset. + The network identifier of the asset. + A human-readable label for the parent context. + An alternative identifier, whose value is easily sortable among other such values in the document. + The name of the baseline configuration for the asset. + Can the asset be check with an authenticated scan? (yes/no) + The function provided by the asset for the system. + + + + Accountable for ensuring the asset is managed in accordance with organizational policies and procedures. + Responsible for administering a set of assets. + Members of the security operations center (SOC). + Members of the network operations center (NOC). + Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions. + Responsible for providing information and support to users. + Responsible for the configuration management processes governing changes to the asset. + + + + + + + + + + + + + The Internet Protocol v4 Address of the asset. + The Internet Protocol v6 Address of the asset. + The full-qualified domain name (FQDN) of the asset. + A Uniform Resource Identifier (URI) for the asset. + A serial number for the asset. + The NetBIOS name for the asset. + The media access control (MAC) address for the asset. + The physical location of the asset's hardware (e.g., Data Center ID, Cage#, Rack#, or other meaningful location identifiers). + is the asset subjected to network scans? (yes/no) + The model number of the hardware used by the asset. + The name of the operating system used by the asset. + The version of the operating system used by the asset. + The software product name used by the asset. + The software product version used by the asset. + The software product patch level used by the asset. + Simple indication of the asset's function, such as Router, Storage Array, DNS Server. + An organizationally specific identifier that is used to uniquely identify a logical or tangible item by the organization that owns the item. + An asset tag assigned by the organization responsible for maintaining the logical or tangible item. + Identifies whether the asset is publicly accessible (yes/no) + Identifies whether the asset is virtualized (yes/no) + Virtual LAN identifier of the asset. + The network identifier of the asset. + A human-readable label for the parent context. + An alternative identifier, whose value is easily sortable among other such values in the document. + The name of the baseline configuration for the asset. + Can the asset be check with an authenticated scan? (yes/no) + The function provided by the asset for the system. + + + System software that manages computer hardware, software resources, and provides common services for computer programs. + An electronic collection of data, or information, that is specially organized for rapid search and retrieval. + A system that delivers content or services to end users over the Internet or an intranet. + A system that resolves domain names to internet protocol (IP) addresses. + A computer system that sends and receives electronic mail messages. + A system that stores, organizes and provides access to directory information in order to unify network resources. + A private branch exchange (PBX) provides a a private telephone switchboard. + A network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. + A physical or virtual networking device that forwards data packets between computer networks. + A physical or virtual networking device that connects devices within a computer network by using packet switching to receive and forward data to the destination device. + A consolidated, block-level data storage capability. + A physical or virtual machine that centralizes hardware, software, or services for a specific purpose. + + + The name of the company or organization + + + The asset is included in periodic vulnerability scanning. + The asset is not included in periodic vulnerability scanning. + + + A reference to the baseline template used to configure the asset. + + + Accountable for ensuring the asset is managed in accordance with organizational policies and procedures. + Responsible for administering a set of assets. + Members of the security operations center (SOC). + Members of the network operations center (NOC). + Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions. + Responsible for providing information and support to users. + Responsible for the configuration management processes governing changes to the asset. + Responsible for the creation and maintenance of a component. + Organization responsible for providing the component, if this is different from the "maintainer" (e.g., a reseller). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The type of user, such as internal, external, or general-public. + The user's privilege level within the system, such as privileged, non-privileged, no-logical-access. + + + A user account for a person or entity that is part of the organization who owns or operates the system. + A user account for a person or entity that is not part of the organization who owns or operates the system. + A user of the system considered to be outside + + + This role has elevated access to the system, such as a group or system administrator. + This role has typical user-level access to the system without elevated access. + This role has no access to the system, such as a manager who approves access as part of a process. + + + Accountable for ensuring the asset is managed in accordance with organizational policies and procedures. + Responsible for administering a set of assets. + Members of the security operations center (SOC). + Members of the network operations center (NOC). + Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions. + Responsible for providing information and support to users. + Responsible for the configuration management processes governing changes to the asset. + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + + + + + + + + + + **(deprecated)** Use 'assessment-objective' instead. + **(deprecated)** Use 'assessment-method' instead. + The part defines an assessment objective. + The part defines an assessment method. + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The assessment method to use. This typically appears on parts with the name "assessment". + + + + The process of holding discussions with individuals or groups of individuals within an organization to once again, facilitate assessor understanding, achieve clarification, or obtain evidence. + The process of reviewing, inspecting, observing, studying, or analyzing one or more assessment objects (i.e., specifications, mechanisms, or activities). + The process of exercising one or more assessment objects (i.e., activities or mechanisms) under specified conditions to compare actual with expected behavior. + + + + + + + + + + + + + + + + + + + + + + + + + + + An assessment asset. + An assessment method. + Describes a set of control objectives. + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + + The assessment method to use. This typically appears on parts with the name "objective". + + + + The process of holding discussions with individuals or groups of individuals within an organization to once again, facilitate assessor understanding, achieve clarification, or obtain evidence. + The process of reviewing, inspecting, observing, studying, or analyzing one or more assessment objects (i.e., specifications, mechanisms, or activities). + The process of exercising one or more assessment objects (i.e., activities or mechanisms) under specified conditions to compare actual with expected behavior. + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + The assessment method to use. This typically appears on parts with the name "objective". + + + + The process of holding discussions with individuals or groups of individuals within an organization to once again, facilitate assessor understanding, achieve clarification, or obtain evidence. + The process of reviewing, inspecting, observing, studying, or analyzing one or more assessment objects (i.e., specifications, mechanisms, or activities). + The process of exercising one or more assessment objects (i.e., activities or mechanisms) under specified conditions to compare actual with expected behavior. + + + + + + + Defines the circumstances, conditions, degree, and manner in which the use of cyber-attack techniques or actions may be applied to the assessment. + Any information the assessor should make known to the system owner or authorizing official. Has child 'item' parts for each individual disclosure. + Defines any assessment activities which the system owner or authorizing official wishes to ensure are performed as part of the assessment. + Defines any assessment activities which the system owner or authorizing official explicitly prohibits from being performed as part of the assessment. + Defines conditions related to the delivery of the assessment results, such as when to deliver, how, and to whom. + Defines any supposition made by the assessor. Has child 'item' parts for each assumption. + An explanation of practices, procedures, and rules used in the course of the assessment. + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The referenced assessment subject is a component defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + The referenced assessment subject is a inventory item defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + The referenced assessment subject is a location defined in the metadata of the SSP, Assessment Plan, or Assessment Results. + The referenced assessment subject is a person or team to interview, who is defined as a party in the metadata of the SSP, Assessment Plan, or Assessment Results. + The referenced assessment subject is a user defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + Component + Inventory Item + Location + Interview Party + User + Resource or Artifact + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Component + Inventory Item + Location + Interview Party + User + Resource or Artifact + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The system as a whole. + An external system, which may be a leveraged system or the other side of an interconnection. + A connection to something outside this system. + Any software, operating system, or firmware. + A physical device. + A service that may provide APIs. + An enforceable policy. + A tangible asset used to provide physical protections or countermeasures. + A list of steps or actions to take to achieve some end result. + An applicable plan. + Any guideline or recommendation. + Any organizational or industry standard. + An external assessment performed on some other component, that has been validated by a third-party. + A physical or virtual network. + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + The component is being designed, developed, or implemented. + The component is currently operational and is available for use in the system. + The component is no longer operational. + Some other state. + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Transmission Control Protocol + User Datagram Protocol + + + + + + + + It is a best practice to provide a UUID. + + + + + + + + + + Relative placement of component ('internal' or 'external') to the system. + UUID of the related leveraged-authorization assembly in this SSP. + UUID of the component as it was assigned in the leveraged system's SSP. + Simple indication of the asset's function, such as Router, Storage Array, DNS Server. + An organizationally specific identifier that is used to uniquely identify a logical or tangible item by the organization that owns the item. + An asset tag assigned by the organization responsible for maintaining the logical or tangible item. + Identifies whether the asset is publicly accessible (yes/no) + Identifies whether the asset is virtualized (yes/no) + Virtual LAN identifier of the asset. + The network identifier of the asset. + A human-readable label for the parent context. + An alternative identifier, whose value is easily sortable among other such values in the document. + The name of the baseline configuration for the asset. + Can the asset be check with an authenticated scan? (yes/no) + The function provided by the asset for the system. + The version of the component. + The specific patch level of the component. + The model of the component. + The date the component was released, such as a software release date or policy publication date. + Used with component-type='validation' to provide a well-known name for a kind of validation. + Used with component-type='validation' to indicate the validating body's assigned identifier for their validation of this component. + + + A reference to another component that this component has a dependency on. + A reference to another component of component-type=validation, that is a validation (e.g., FIPS 140-2) for this component + A pointer to a validation record (e.g., FIPS 140-2) or other compliance information. + A reference to the baseline template used to configure the asset. + This service is used by the referenced component identifier. + A link to the system security plan of the external system. + This component uses the network provided by the identified network component. + + + Accountable for ensuring the asset is managed in accordance with organizational policies and procedures. + Responsible for administering a set of assets. + Members of the security operations center (SOC). + Members of the network operations center (NOC). + Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions. + Responsible for providing information and support to users. + Responsible for the configuration management processes governing changes to the asset. + Responsible for the creation and maintenance of a component. + Organization responsible for providing the component, if this is different from the "maintainer" (e.g., a reseller). + + + System software that manages computer hardware, software resources, and provides common services for computer programs. + An electronic collection of data, or information, that is specially organized for rapid search and retrieval. + A system that delivers content or services to end users over the Internet or an intranet. + A system that resolves domain names to internet protocol (IP) addresses. + A computer system that sends and receives electronic mail messages. + A system that stores, organizes and provides access to directory information in order to unify network resources. + A private branch exchange (PBX) provides a a private telephone switchboard. + A network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. + A physical or virtual networking device that forwards data packets between computer networks. + A physical or virtual networking device that connects devices within a computer network by using packet switching to receive and forward data to the destination device. + A consolidated, block-level data storage capability. + A physical or virtual machine that centralizes hardware, software, or services for a specific purpose. + + + The component allows an authenticated scan. + The component does not allow an authenticated scan. + + + The component is publicly accessible. + The component is not publicly accessible. + + + The component is virtualized. + The component is not virtualized. + + + The component is implemented within the system boundary. + The component is implemented outside the system boundary. + + + + + + + + The name of the company or organization + + + A link to an online information provided by the authorizing body. + + + If a "software" component-type, the identifier, such as a SWID tag, for the software component. + + + This service is provided by the referenced component identifier. + This service is used by the referenced component identifier. + + + + Title of the Interconnection Security Agreement (ISA). + Date of the Interconnection Security Agreement (ISA). + The name of the remote interconnected system. + An Internet Protocol Version 4 interconnection address + An Internet Protocol Version 6 interconnection address + An Internet Protocol Version 6 interconnection address + + + The identified IP address is for this system. + The identified IP address is for the remote system to which this system is connected. + + + A link to the system interconnection agreement. + + + Interconnection Security Agreement (ISA) point of contact (POC) for this system. + Interconnection Security Agreement (ISA) point of contact (POC) for the remote interconnected system. + Interconnection Security Agreement (ISA) authorizing official for this system. + Interconnection Security Agreement (ISA) authorizing official for the remote interconnected system. + + + + + + Data from the remote system flows into this system. + Data from this system flows to the remote system. + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The task represents a planned milestone. + The task represents a specific assessment action to be performed. + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The period is specified in seconds. + The period is specified in minutes. + The period is specified in hours. + The period is specified in days. + The period is specified in calendar months. + The period is specified in calendar years. + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The referenced assessment subject is a component defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + The referenced assessment subject is a inventory item defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + The referenced assessment subject is a location defined in the metadata of the SSP, Assessment Plan, or Assessment Results. + The referenced assessment subject is a person or team to interview, who is defined as a party in the metadata of the SSP, Assessment Plan, or Assessment Results. + The referenced assessment subject is a user defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + Component + Inventory Item + Location + Interview Party + User + Resource or Artifact + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Component + Inventory Item + Location + Interview Party + User + Resource or Artifact + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The referenced assessment subject is a component defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + The referenced assessment subject is a inventory item defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + The referenced assessment subject is a location defined in the metadata of the SSP, Assessment Plan, or Assessment Results. + The referenced assessment subject is a person or team to interview, who is defined as a party in the metadata of the SSP, Assessment Plan, or Assessment Results. + The referenced assessment subject is a user defined in the SSP, or in the local-definitions of an Assessment Plan or Assessment Results. + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + Component + Inventory Item + Location + Interview Party + User + Resource or Artifact + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Component + Inventory Item + Location + Interview Party + User + Resource or Artifact + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + A Digital Object Identifier (DOI); use is preferred, since this allows for retrieval of a full bibliographic record. + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + The SHA-224 algorithm as defined by NIST FIPS 180-4. + + The SHA-256 algorithm as defined by NIST FIPS 180-4. + + The SHA-384 algorithm as defined by NIST FIPS 180-4. + + The SHA-512 algorithm as defined by NIST FIPS 180-4. + + The SHA3-224 algorithm as defined by NIST FIPS 202. + + The SHA3-256 algorithm as defined by NIST FIPS 202. + + The SHA3-384 algorithm as defined by NIST FIPS 202. + + The SHA3-512 algorithm as defined by NIST FIPS 202. + + + + + + + + + + + + + + + + + + + + Identifies the type of resource represented. + For resources representing a published document, this represents the version number of that document. + For resources representing a published document, this represents the publication date of that document. + + + + Indicates the resource is an organization's logo. + Indicates the resource represents an image. + Indicates the resource represents an image of screen content. + Indicates the resource represents an applicable law. + Indicates the resource represents an applicable regulation. + Indicates the resource represents an applicable standard. + Indicates the resource represents applicable guidance. + Indicates the resource provides a list of relevant acronyms. + Indicates the resource cites relevant information. + Indicates the resource is a policy. + Indicates the resource is a procedure. + Indicates the resource is guidance document related to the subject system of an SSP. + Indicates the resource is guidance document a user's guide or administrator's guide. + Indicates the resource is guidance document a administrator's guide. + Indicates the resource represents rules of behavior content. + Indicates the resource represents a plan. + Indicates the resource represents an artifact, such as may be reviewed by an assessor. + Indicates the resource represents evidence, such as to support an assessment findiing. + Indicates the resource represents output from a tool. + Indicates the resource represents machine data, which may require a tool or analysis for interpretation or presentation. + Indicates the resource represents notes from an interview, such as may be collected during an assessment. + Indicates the resource is a set of questions, possibly with responses. + Indicates the resource is a report. + Indicates the resource is a formal agreement between two or more parties. + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/converter-gen/testing/definition-maps/profile-reduce-map-output.xml b/src/converter-gen/testing/definition-maps/profile-reduce-map-output.xml new file mode 100644 index 00000000..93e88da9 --- /dev/null +++ b/src/converter-gen/testing/definition-maps/profile-reduce-map-output.xml @@ -0,0 +1,7009 @@ + + + + OSCAL Profile Model + 1.0.4 + oscal-profile + http://csrc.nist.gov/ns/oscal/1.0 + http://csrc.nist.gov/ns/oscal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + The link identifies the authoritative location for this file. Defined by RFC 6596. + The link identifies an alternative location or format for this file. Defined by the HTML Living Standard + + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + + + + + + + + + + A Digital Object Identifier (DOI); use is preferred, since this allows for retrieval of a full bibliographic record. + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A home address. + A work address. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A home phone number. + An office phone number. + A mobile phone number. + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + Characterizes the kind of location. + + + A location that contains computing assets. A class can be used to indicate the sub-type of data-center as primary or alternate. + + + The location is a data-center used for normal operations. + The location is a data-center used for fail-over or backup operations. + + + + + + + + + + + An individual. + A group of individuals formed for a specific purpose. + + + + + + + + + + + + + + + The identifier is Open Researcher and Contributor ID (ORCID). + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + A home phone number. + An office phone number. + A mobile phone number. + + + + + + + + + + + + + A home address. + A work address. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A mail stop associated with the party. + The name or number of the party's office. + The formal job title of a person. + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates the organization that created this content. + Indicates the organization that prepared this content. + Indicates the organization for which this content was created. + Indicates the organization responsible for all content represented in the "document". + Indicates the organization to contact for questions or support related to this content. + + + The value identifies a comma-seperated listing of keywords associated with this content. These keywords may be used as search terms for indexing and other applications. + + + The link identifies the authoritative location for this file. Defined by RFC 6596. + The link identifies an alternative location or format for this file. Defined by the HTML Living Standard + + This link identifies a resource containing the latest version in the version history. Defined by RFC 5829. + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + This link identifies a resource containing the predecessor version in the version history. Defined by RFC 5829. + + + + + + + + + + + + + + Include child controls with an included control. + When importing a control, only include child controls that are also explicitly called. + + + + + + + + + + + + + + + + + + + + + + Include child controls with an included control. + When importing a control, only include child controls that are also explicitly called. + + + + + + + + + + + + + + + + + + + + + + + Use the first definition - the first control with a given ID is used; subsequent ones are discarded + **(deprecated)** **(unspecified)** Merge - controls with the same ID are combined + Keep - controls with the same ID are kept, retaining the clash + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only one value is permitted. + One or more values are permitted. + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + An alternate to the value provided by the parameter's label. This will typically be qualified by a class. + + + The parent parameter provides an aggregation of 2 or more other parameters, each described by this property. + + + depends-on is deprecated + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + + + + + + + + + + + + + + + + + + + + + + + + + + + Include child controls with an included control. + When importing a control, only include child controls that are also explicitly called. + + + + + + + + + + + + + + + + + + + + + + Include child controls with an included control. + When importing a control, only include child controls that are also explicitly called. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Include child controls with an included control. + When importing a control, only include child controls that are also explicitly called. + + + + + + + + + + + + + + + + + + + + + + Include child controls with an included control. + When importing a control, only include child controls that are also explicitly called. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only one value is permitted. + One or more values are permitted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Preceding the id-ref target + Following the id-ref target + Inside the control or id-ref target, at the start + Inside the control or id-ref target, at the end + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only one value is permitted. + One or more values are permitted. + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + An alternate to the value provided by the parameter's label. This will typically be qualified by a class. + + + The parent parameter provides an aggregation of 2 or more other parameters, each described by this property. + + + depends-on is deprecated + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + + + + + + + A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases. + An alternative identifier, whose value is easily sortable among other such values in the document. + An alternate or aliased identifier for the parent context. + + + + + + + + + + + + + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + A Digital Object Identifier (DOI); use is preferred, since this allows for retrieval of a full bibliographic record. + + + + + + + + + + + + + + + + A label or descriptor that is tied to a sensitivity or classification marking system. An optional class can be used to define the specific marking system used for the associated value. + + + + + + + + + + + + + + + + + + + Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + The SHA-224 algorithm as defined by NIST FIPS 180-4. + + The SHA-256 algorithm as defined by NIST FIPS 180-4. + + The SHA-384 algorithm as defined by NIST FIPS 180-4. + + The SHA-512 algorithm as defined by NIST FIPS 180-4. + + The SHA3-224 algorithm as defined by NIST FIPS 202. + + The SHA3-256 algorithm as defined by NIST FIPS 202. + + The SHA3-384 algorithm as defined by NIST FIPS 202. + + The SHA3-512 algorithm as defined by NIST FIPS 202. + + + + + + + + + + + + + + + + + + + + Identifies the type of resource represented. + For resources representing a published document, this represents the version number of that document. + For resources representing a published document, this represents the publication date of that document. + + + + Indicates the resource is an organization's logo. + Indicates the resource represents an image. + Indicates the resource represents an image of screen content. + Indicates the resource represents an applicable law. + Indicates the resource represents an applicable regulation. + Indicates the resource represents an applicable standard. + Indicates the resource represents applicable guidance. + Indicates the resource provides a list of relevant acronyms. + Indicates the resource cites relevant information. + Indicates the resource is a policy. + Indicates the resource is a procedure. + Indicates the resource is guidance document related to the subject system of an SSP. + Indicates the resource is guidance document a user's guide or administrator's guide. + Indicates the resource is guidance document a administrator's guide. + Indicates the resource represents rules of behavior content. + Indicates the resource represents a plan. + Indicates the resource represents an artifact, such as may be reviewed by an assessor. + Indicates the resource represents evidence, such as to support an assessment findiing. + Indicates the resource represents output from a tool. + Indicates the resource represents machine data, which may require a tool or analysis for interpretation or presentation. + Indicates the resource represents notes from an interview, such as may be collected during an assessment. + Indicates the resource is a set of questions, possibly with responses. + Indicates the resource is a report. + Indicates the resource is a formal agreement between two or more parties. + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/converter-gen/testing/xml-converters/computer-build-xml-converter.xsl b/src/converter-gen/testing/xml-converters/computer-build-xml-converter.xsl new file mode 100644 index 00000000..db3565a3 --- /dev/null +++ b/src/converter-gen/testing/xml-converters/computer-build-xml-converter.xsl @@ -0,0 +1,12 @@ + + + + +http://csrc.nist.gov/ns/oscal/1.0 + diff --git a/src/converter-gen/testing/xml-to-json/produce-xml-converter-json-usage.xspec b/src/converter-gen/testing/xml-to-json/produce-xml-converter-json-usage.xspec new file mode 100644 index 00000000..28db3324 --- /dev/null +++ b/src/converter-gen/testing/xml-to-json/produce-xml-converter-json-usage.xspec @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + stub + + + + + + + + + + + + stub + + + + + + + + + + + diff --git a/src/converter-gen/testing/xml-to-json/produce-xml-converter.xspec b/src/converter-gen/testing/xml-to-json/produce-xml-converter.xspec index d679de27..94a1a975 100644 --- a/src/converter-gen/testing/xml-to-json/produce-xml-converter.xspec +++ b/src/converter-gen/testing/xml-to-json/produce-xml-converter.xspec @@ -1,14 +1,61 @@ + + + + + + + + + stub + + + + + + + + + + stub + + + + + + + + + + + + + + + + + + + + + + + + ... + ... + ... + + + + + + + + + + + + + + + + + ... + ... + ... + ... + + + + + + + + + + + + + + + ... + ... + ... + + + + + + + + + + + + + + + ... + ... + ... + ... + + + + + + + + + + + + + + + + ... + ... + ... + + + + + + + + + + + + + + + + ... + ... + + + + + + + + + + + + + + + + ... + ... + ... + + + + + + + + + + + + + + + + + + + + ... + ... + ... + ... + + + + + + + + + + + + + + + + ... + ... + ... + + + + + + + + + + + + + + + + + + ... + ... + ... + ... + ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://csrc.nist.gov/ns/oscal/1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + stub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + remarks + + ... + + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + + + + + + k + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + + + + + + + + + ... + + + + + + + + ... + + + + + ... + + + + + + + + + + + + + + ... + ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + + ... + ... + ... + ... + ... + ... + + + + + + + + + + + + + + ... + ... + ... + ... + ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + prop/@uuid + + + + profile/@uuid + + + + + + + + + + + + group/part/@id | group/part//part/@id | add/part/@id | add/part//part/@id + + + + + + + + + + + + + + + + + + link1/@href | link2/@href + + + + + + + + + + + + + + + + + + link/@href + + + + + + + + + @uuid + + + + + + + + + prop + + + + + + + + prop + + + + + + + + + + + + + group/part | group/part//part | add/part | add/part//part + + + + + + + + + + + + + + + + { + concat( + 'alias/assembly-1only | alias/assembly-1only//assembly-1only | ', + 'alias/assembly-1only | alias/assembly-1only//assembly-1only | ', + 'EVERYTHING/assembly-1only | EVERYTHING/assembly-1only//assembly-1only | ', + '/ASSEMBLY-1ONLY | ASSEMBLY-1ONLY//assembly-1only' + )} + + + + + + + + + metadata/location + + + + + + + + + + + param/value | set-parameter/value | param/value + + + + + + + + + + + profile + + + + + + + + part + + + + + + + + + + + + + + + profile/merge/custom + + + + + + + + + + + + + profile//merge/custom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + + + + + + + A label or descriptor that... + + + + + + + + + + + ... + + + ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + ... + + + + + + + + + + + + + + + + + + ... + + + ... + + + ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/converter-gen/testing/xml-to-json/test-helper-xml-to-json.xsl b/src/converter-gen/testing/xml-to-json/test-helper-xml-to-json.xsl new file mode 100644 index 00000000..5f91850b --- /dev/null +++ b/src/converter-gen/testing/xml-to-json/test-helper-xml-to-json.xsl @@ -0,0 +1,37 @@ + + + + + + Reached make-xml-pull mode + + + + + Reached make-xml-match mode + for any-element + + + + Reached make-json-pull mode + + + + Reached make-template mode + + + \ No newline at end of file diff --git a/src/converter-gen/xml-to-json/produce-xml-converter.xsl b/src/converter-gen/xml-to-json/produce-xml-converter.xsl index b5aa513c..84c8d2df 100644 --- a/src/converter-gen/xml-to-json/produce-xml-converter.xsl +++ b/src/converter-gen/xml-to-json/produce-xml-converter.xsl @@ -6,7 +6,8 @@ xpath-default-namespace="http://csrc.nist.gov/ns/oscal/metaschema/1.0" version="3.0" - xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0/supermodel"> + xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0/supermodel" + xmlns:sm="http://csrc.nist.gov/ns/oscal/metaschema/1.0/supermodel"> @@ -33,7 +34,7 @@ - + @@ -58,7 +59,8 @@ - + @@ -70,7 +72,8 @@ - + @@ -97,24 +100,25 @@ - + { $source-namespace } - + - - + + + - + METASCHEMA conversion stylesheet supports XML -> METASCHEMA/SUPERMODEL conversion - + @@ -125,9 +129,10 @@ - + + - + @@ -138,28 +143,37 @@ - + - + - + - + - - - - + + + + + + + - + @@ -187,9 +201,9 @@ - - + + @@ -197,8 +211,9 @@ - - + + @@ -219,18 +234,23 @@ - - - - - - - + + + + + + + + - - + + @@ -244,8 +264,8 @@ - - + + @@ -259,39 +279,43 @@ b3/a (when a does not recurse inside b3)--> - + - - - - - - - - - - | - - + + + + + + + + + + + | + + + / + + / - - - / - / - - - - - - - - - + / + + + + + + + + + + - + - + + @@ -371,6 +396,7 @@ + @@ -378,17 +404,19 @@ - + - p | ul | ol | pre | h1 | h2 | h3 | h4 | h5 | h6 | table + p | ul | ol | pre | h1 | h2 | h3 | h4 | h5 | h6 | table - + + @@ -400,8 +428,9 @@ - - + + @@ -411,22 +440,23 @@ --> - - - + + + - + - + @@ -435,11 +465,11 @@ - + string - + boolean @@ -457,26 +487,29 @@ decimal - + number - + - + - + - + \ No newline at end of file diff --git a/src/metapath/readme.md b/src/metapath/readme.md index 53a981a5..d2f20b52 100644 --- a/src/metapath/readme.md +++ b/src/metapath/readme.md @@ -7,3 +7,17 @@ Provides for processing Metapath syntax and operations dependent on processing s Modules here including `metapath-jsonize.xsl` and `docs-metapath.xsl` may be included or called into pipelines elsewhere in this library. Provided XSpec tests along with inline code help to document the interfaces. + +## Note to developers + +This implementation was first built out of necessity, and includes functionality untested before its development, as well as machine-generated code whose ongoing reproduction may be problematic. + +At the same time, since its inception, new capabilities in the XML stack, notably [Invisible XML](https://invisiblexml.org), provide a strong foundation for further work. + +See also the related project repository hosting iXML support, the [iXML Breadboard](https://github.com/usnistgov/ixml-breadboard) + +Accordingly, next steps might include a near-term migration onto an iXML-based implementation providing the same service. + +For an iXML grammar, until a normative Metapath grammar is published, the alignment target is [the Metapath grammar](https://github.com/usnistgov/metaschema-java/blob/main/core/src/main/antlr4/metapath10.g4) supported in the metaschema-java project. + +--- diff --git a/src/schema-gen/InspectorXSLT/Makefile b/src/schema-gen/InspectorXSLT/Makefile index 5a9e87bb..5d7854dc 100644 --- a/src/schema-gen/InspectorXSLT/Makefile +++ b/src/schema-gen/InspectorXSLT/Makefile @@ -10,8 +10,8 @@ include ../../testing/make_common.mk module_path:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) output_folder:=$(module_path)/test_output -xspec_script=$(realpath $(module_path)/../../../support/xspec-dev/mvn-saxon-xspec-batch-quiet.sh) -xspec_ci_script=$(realpath $(module_path)/../../../support/xspec-dev/mvn-saxon-xspec-batch.sh) +xspec_script=$(realpath $(module_path)/../../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch-quiet.sh) +xspec_ci_script=$(realpath $(module_path)/../../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch.sh) smoketest_script=$(realpath $(module_path)/testing/smoketest-computer-inspector.sh) testing-refresh_script=$(realpath $(module_path)/testing/refresh-test-inspectors.sh) folder=. diff --git a/src/schema-gen/InspectorXSLT/testing/OSCAL-INSPECTOR-XSLT.xpl b/src/schema-gen/InspectorXSLT/testing/OSCAL-INSPECTOR-XSLT.xpl new file mode 100644 index 00000000..cd890b8c --- /dev/null +++ b/src/schema-gen/InspectorXSLT/testing/OSCAL-INSPECTOR-XSLT.xpl @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/schema-gen/InspectorXSLT/testing/TEST-INSPECTOR-RUNTIME.xpl b/src/schema-gen/InspectorXSLT/testing/TEST-INSPECTOR-RUNTIME.xpl index 07380b31..e1b57cf5 100644 --- a/src/schema-gen/InspectorXSLT/testing/TEST-INSPECTOR-RUNTIME.xpl +++ b/src/schema-gen/InspectorXSLT/testing/TEST-INSPECTOR-RUNTIME.xpl @@ -88,4 +88,4 @@ - \ No newline at end of file + diff --git a/src/schema-gen/InspectorXSLT/testing/current/computer_inspector.xsl b/src/schema-gen/InspectorXSLT/testing/current/computer_inspector.xsl new file mode 100644 index 00000000..ee68e076 --- /dev/null +++ b/src/schema-gen/InspectorXSLT/testing/current/computer_inspector.xsl @@ -0,0 +1,2360 @@ + + + + + + + + + inspected + + full + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + av.152 + _UE unmatched-element + Unrecognized element { name() }. + + + + + + + + + + + + + + av.180 + _UT unexpected-text + Errant text content. + + + + + + + av.193 + _UA unmatched-attribute + Unrecognized attribute @{ name() } on element { name(..) }. + + + + + + + + + + exists(.) + + __U uncategorized + * + [info] + ERROR + + + + + + + + + + + + + + + + + + [info] + + + + + + + + + /{ name() } + + + + + /{ name() }[{ mx:element-position(.)[count($kin) gt 1] }] + + + + /@{ name() } + + + + + [{ count(preceding-sibling::text()|.) }] + /text(){ (count($kin)[. gt 1]) ! $place } + + + + + [{ count(preceding-sibling::comment()|.) }] + /text(){ (count($kin)[. gt 1]) ! $place } + + + + + [{ count(preceding-sibling::processing-instruction()|.) + }] + /text(){ (count($kin)[. gt 1]) ! $place } + + + + + + + + + + + { $as } + { $as }s + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File { replace(@src,'.*/','') } has { $error-count } { + mx:pluralize($error-count,'error')}. + File { replace(@src,'.*/','') } has { $report-count } { + mx:pluralize($report-count,'issue') } reported including { $error-count } { + mx:pluralize($error-count,'error')}. + + + + + + + + + + File { replace(@src,'.*/','') } is reported VALID, no issues ... + + + + + + + + + + + + + + + + + + + + + + + + + { (@level,'ERROR')[1] } [CLASS) { @class } ][PATH) { @xpath } ][REPORT) { + string(.) }] + + + + + + + + + + + + { $validating-filename } - { $checked } - { mx:metaschema/@shortname } validation + + + + + + +

{ $checked } Validating { $validating-filename } - { mx:metaschema } - found { + 'IN'[not($reported-valid)] }VALID

+ + +

+ { $validating-filename } contains { @elements} { + mx:pluralize(@elements/number(),'element') } and { @attributes } { + mx:pluralize(@attributes/number(),'attribute') }.

+ + +
+ +
+
+
+ + +
+ + + + + + +
+

{ count(.//mx:report) } { mx:pluralize(count(.//mx:report),'issue') } reported.

+

+ + 💥 + +

+
+
+ +
+

Good news - nothing to report - the instance is valid. 🚀 +

+
+
+ + + + +
+ + + +

{ @class }{ @level[not(.='ERROR')] ! (' ' || .) }

+
    + +
  • Rule ID: { . } +
  • +
    +
  • test: { @test } +
  • + +
  • matching: { @matching } +
  • +
    +
  • XPath: { @xpath } +
  • +
+
+
+ + + + + + + + + + + + + + + + + { codepoints-to-string(10) } + + + + + + + { $lf } + + + + { $lf2 }--- + + + + # + + + + + { $lf2 }# + + + + + { $lf2 }## + + + + + { $lf2 }### + + + + + { $lf2 } + + + + + + + + + { $lf }- + + + + ** + + ** + + + * + + * + + + ` + + ` + + + Computer Model + + + + + + + + + + + + + + + + + + + gix.670 + + computer/(usb-device) + UNIQ uniqueness-violation + not(count(mx:key-matches-among-items(.,$selected,'UNQ_3',(@uuid),$within))=1) + + With respect to its assigned (@uuid), this {name(.)} instance of computer/(usb-device) is expected to be unique within its {$within/name(.)}. {count(mx:key-matches-among-items(.,$selected,'UNQ_3',(@uuid),$within))} items are found with the value {string-join(((@uuid)),',')}. + + + + + + + + + + + gix.670 + + computer/(descendant::*[exists(@serial-number)]) + UNIQ uniqueness-violation + not(count(mx:key-matches-among-items(.,$selected,'UNQ_4',(@serial-number),$within))=1) + + With respect to its assigned (@serial-number), this {name(.)} instance of computer/(descendant::*[exists(@serial-number)]) is expected to be unique within its {$within/name(.)}. {count(mx:key-matches-among-items(.,$selected,'UNQ_4',(@serial-number),$within))} items are found with the value {string-join(((@serial-number)),',')}. + + + + + + + gix.502 + + computer/(.//prop[not(@ns) or @ns=('http://example.com/ns/computer')]/@name) + AVCV value-not-allowed + not(.=('model')) + + Value { string(.) }{ .[not(string(.))] ! ' (empty)' } does not appear among permissible (enumerated) values for this { name() }: model. + + + + + + + gix.589 + + computer + HCCV cardinality-violation + not(count(.//prop[not(@ns) or @ns=('http://example.com/ns/computer')]) ge 1 and true()) + + Counting .//prop[not(@ns) or @ns=('http://example.com/ns/computer')] under computer finds {count(.//prop[not(@ns) or @ns=('http://example.com/ns/computer')])} - expecting at least 1. + + + + + + gix.589 + + computer + HCCV cardinality-violation + not(true() and count(.//prop[not(@ns) or @ns=('http://example.com/ns/computer')]) le 1) + + Counting .//prop[not(@ns) or @ns=('http://example.com/ns/computer')] under computer finds {count(.//prop[not(@ns) or @ns=('http://example.com/ns/computer')])} - expecting no more than 1. + + + + + + + + + + gix.621 + + computer/(//a) + NXHK index-lookup-fail + not(exists(mx:key-matches-among-items(.,$selected,'NDX_internal-links',(@href)[matches(.,'^#(.+)$')] ! replace(.,'^#(.+)$','$1'),$within))) + + With respect to its assigned index value, this {name(.)} is expected to correspond within its {$within/name(.)} to a value listed under index internal-links. This index has no entry under the key value {string-join(((@href)[matches(.,'^#(.+)$')] ! replace(.,'^#(.+)$','$1')),',')}. + + + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::vendor) gt 1 + + Element vendor appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::type | preceding-sibling::cpu | preceding-sibling::ata-socket | preceding-sibling::memory | preceding-sibling::cooling | preceding-sibling::expansion-card) + + Element vendor is unexpected following type, cpu, ata-socket, memory, cooling, or expansion-card. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::vendor) gt 1 + + Element vendor appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::product-name | preceding-sibling::cost | preceding-sibling::architecture | preceding-sibling::speed | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element vendor is unexpected following product-name, cost, architecture, speed, prop, or remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::prop) gt 1 + + Element prop appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element prop is unexpected following remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::vendor) gt 1 + + Element vendor appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::product-name | preceding-sibling::cost | preceding-sibling::type | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element vendor is unexpected following product-name, cost, type, prop, or remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::prop) gt 1 + + Element prop appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element prop is unexpected following remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::vendor) gt 1 + + Element vendor appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::product-name | preceding-sibling::cost | preceding-sibling::byte-size | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element vendor is unexpected following product-name, cost, byte-size, prop, or remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::prop) gt 1 + + Element prop appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element prop is unexpected following remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::cooling) gt 1 + + Element cooling appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::expansion-card) + + Element cooling is unexpected following expansion-card. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::vendor) gt 1 + + Element vendor appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::product-name | preceding-sibling::cost | preceding-sibling::type | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element vendor is unexpected following product-name, cost, type, prop, or remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::prop) gt 1 + + Element prop appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element prop is unexpected following remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::vendor) gt 1 + + Element vendor appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::product-name | preceding-sibling::cost | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element vendor is unexpected following product-name, cost, prop, or remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::prop) gt 1 + + Element prop appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element prop is unexpected following remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::prop) gt 1 + + Element prop appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element prop is unexpected following remarks. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::motherboard) gt 1 + + Element motherboard appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::usb-device | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element motherboard is unexpected following usb-device, prop, or remarks. + + + + + + + gix.564 + + /computer/motherboard/(ata-socket/@slot-no) + XPKT expectation-violation + not(. = (0 to count(../../ata-socket))) + + Expression result for /computer/motherboard/(ata-socket/@slot-no) does not conform to expectation . = (0 to count(../../ata-socket)). + + + + + + + + + + gix.670 + + /computer/motherboard/(ata-socket) + UNIQ uniqueness-violation + not(count(mx:key-matches-among-items(.,$selected,'UNQ_1',(@slot-no),$within))=1) + + With respect to its assigned (@slot-no), this {name(.)} instance of /computer/motherboard/(ata-socket) is expected to be unique within its {$within/name(.)}. {count(mx:key-matches-among-items(.,$selected,'UNQ_1',(@slot-no),$within))} items are found with the value {string-join(((@slot-no)),',')}. + + + + + + + + + + + gix.621 + + /computer/motherboard/(expansion-card) + NXHK index-lookup-fail + not(exists(mx:key-matches-among-items(.,$selected,'NDX_socket-by-slot',(@socket-no),$within))) + + With respect to its assigned index value, this {name(.)} is expected to correspond within its {$within/name(.)} to a value listed under index socket-by-slot. This index has no entry under the key value {string-join(((@socket-no)),',')}. + + + + + + + gix.589 + + /computer/motherboard + HCCV cardinality-violation + not(count(memory) ge 2 and count(memory) le 12) + + Counting memory under /computer/motherboard finds {count(memory)} - expecting at least 2, no more than 12. + + + + + + gix.564 + + /computer/motherboard + XPKT expectation-violation + not(not(count(child::memory) mod 2)) + + Expression result for /computer/motherboard does not conform to expectation not(count(child::memory) mod 2). + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::cpu) gt 1 + + Element cpu appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::ata-socket | preceding-sibling::memory | preceding-sibling::cooling | preceding-sibling::expansion-card) + + Element cpu is unexpected following ata-socket, memory, cooling, or expansion-card. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::ata-socket) gt 8 + + Element ata-socket appears too many times: 8 maximum are permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::memory | preceding-sibling::cooling | preceding-sibling::expansion-card) + + Element ata-socket is unexpected following memory, cooling, or expansion-card. + + + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::cooling | preceding-sibling::expansion-card) + + Element memory is unexpected following cooling or expansion-card. + + + + + + + + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element usb-device is unexpected following prop or remarks. + + + + + + + + gix.336 + EATI element-appears-too-infrequently + empty(following-sibling::fan) and (count(. | preceding-sibling::fan) lt 2) + + Element fan appears too few times: 2 minimum are required. + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::fan) gt 12 + + Element fan appears too many times: 12 maximum are permitted. + + + gix.362 + empty(preceding-sibling::fan) and exists(../(water)) + + VEXC violates-exclusive-choice + Element fan is unexpected along with water. + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::water) gt 1 + + Element water appears too many times: 1 maximum is permitted. + + + gix.362 + empty(preceding-sibling::water) and exists(../(fan)) + + VEXC violates-exclusive-choice + Element water is unexpected along with fan. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::product-name) gt 1 + + Element product-name appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::cost | preceding-sibling::architecture | preceding-sibling::speed | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element product-name is unexpected following cost, architecture, speed, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::cost) gt 1 + + Element cost appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::architecture | preceding-sibling::speed | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element cost is unexpected following architecture, speed, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::product-name) gt 1 + + Element product-name appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::cost | preceding-sibling::type | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element product-name is unexpected following cost, type, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::cost) gt 1 + + Element cost appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::type | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element cost is unexpected following type, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::product-name) gt 1 + + Element product-name appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::cost | preceding-sibling::byte-size | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element product-name is unexpected following cost, byte-size, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::cost) gt 1 + + Element cost appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::byte-size | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element cost is unexpected following byte-size, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::product-name) gt 1 + + Element product-name appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::cost | preceding-sibling::type | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element product-name is unexpected following cost, type, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::cost) gt 1 + + Element cost appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::type | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element cost is unexpected following type, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::product-name) gt 1 + + Element product-name appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::cost | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element product-name is unexpected following cost, prop, or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::cost) gt 1 + + Element cost appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element cost is unexpected following prop or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::remarks) gt 1 + + Element remarks appears too many times: 1 maximum is permitted. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::name) gt 1 + + Element name appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::address | preceding-sibling::website) + + Element name is unexpected following address or website. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::address) gt 1 + + Element address appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::website) + + Element address is unexpected following website. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::website) gt 1 + + Element website appears too many times: 1 maximum is permitted. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::build-date) gt 1 + + Element build-date appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::motherboard | preceding-sibling::usb-device | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element build-date is unexpected following motherboard, usb-device, prop, or remarks. + + + + + + + gix.564 + + /computer/build-date + XPKT expectation-violation + not(not(. castable as xs:dateTime) or not(xs:dateTime('1970-01-01T00:00:00-05:00') > xs:dateTime(.))) + + Expression result for /computer/build-date does not conform to expectation not(. castable as xs:dateTime) or not(xs:dateTime('1970-01-01T00:00:00-05:00') > xs:dateTime(.)). + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::type) gt 1 + + Element type appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::cpu | preceding-sibling::ata-socket | preceding-sibling::memory | preceding-sibling::cooling | preceding-sibling::expansion-card) + + Element type is unexpected following cpu, ata-socket, memory, cooling, or expansion-card. + + + + + + + gix.502 + + computer/motherboard/type + AVCV value-not-allowed + not(.=('at','atx','mini-itx')) + + Value { string(.) }{ .[not(string(.))] ! ' (empty)' } does not appear among permissible (enumerated) values for this { name() }: at|atx|mini-itx. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::architecture) gt 1 + + Element architecture appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::speed | preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element architecture is unexpected following speed, prop, or remarks. + + + + + + + gix.502 + + motherboard/cpu/architecture + AVCV value-not-allowed + not(.=('x86','x86-64','arm')) + + Value { string(.) }{ .[not(string(.))] ! ' (empty)' } does not appear among permissible (enumerated) values for this { name() }: x86|x86-64|arm. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::speed) gt 1 + + Element speed appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element speed is unexpected following prop or remarks. + + + + + + + gix.536 + + motherboard/cpu/speed + MRCV regex-match-fail + not(matches(., '^\d+(?:\.\d+)?(?:MHz|GHz)$')) + + + { string(.) }{ string(.)[not(.)] ! ' (empty)' } does not match the regular expression defined for this { name() }: \d+(?:\.\d+)?(?:MHz|GHz). + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::type) gt 1 + + Element type appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element type is unexpected following prop or remarks. + + + + + + + gix.502 + + motherboard/ata-socket/type + AVCV value-not-allowed + not(.=('pata','sata')) + + Value { string(.) }{ .[not(string(.))] ! ' (empty)' } does not appear among permissible (enumerated) values for this { name() }: pata|sata. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::byte-size) gt 1 + + Element byte-size appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element byte-size is unexpected following prop or remarks. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::type) gt 1 + + Element type appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::prop | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element type is unexpected following prop or remarks. + + + + + + + gix.502 + + motherboard/expansion-card/type + AVCV value-not-allowed + not(.=('pci','pcie')) + + Value { string(.) }{ .[not(string(.))] ! ' (empty)' } does not appear among permissible (enumerated) values for this { name() }: pci|pcie. + + + + + + + + + + + gix.536 + + /computer/@serial-number + MRCV regex-match-fail + not(matches(., '^^\S+$$')) + + + { string(.) }{ string(.)[not(.)] ! ' (empty)' } does not match the regular expression defined for this { name() }: ^\S+$. + + + + + + + + + + gix.536 + + computer/motherboard/@serial-number + MRCV regex-match-fail + not(matches(., '^^\S+$$')) + + + { string(.) }{ string(.)[not(.)] ! ' (empty)' } does not match the regular expression defined for this { name() }: ^\S+$. + + + + + + + + + + gix.536 + + motherboard/ata-socket/@serial-number + MRCV regex-match-fail + not(matches(., '^^\S+$$')) + + + { string(.) }{ string(.)[not(.)] ! ' (empty)' } does not match the regular expression defined for this { name() }: ^\S+$. + + + + + + + + + + gix.536 + + motherboard/memory/@serial-number + MRCV regex-match-fail + not(matches(., '^^\S+$$')) + + + { string(.) }{ string(.)[not(.)] ! ' (empty)' } does not match the regular expression defined for this { name() }: ^\S+$. + + + + + + + + + + gix.536 + + motherboard/expansion-card/@serial-number + MRCV regex-match-fail + not(matches(., '^^\S+$$')) + + + { string(.) }{ string(.)[not(.)] ! ' (empty)' } does not match the regular expression defined for this { name() }: ^\S+$. + + + + + + + + + + gix.536 + + motherboard/cooling/@serial-number + MRCV regex-match-fail + not(matches(., '^^\S+$$')) + + + { string(.) }{ string(.)[not(.)] ! ' (empty)' } does not match the regular expression defined for this { name() }: ^\S+$. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gix.108 + EOOP element-out-of-place + Element { name() } is not permitted here. + + + + + gix.117 + AOOP attribute-out-of-place + Attribute @{ name() } is not permitted here. + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@id) + + Element { name() } requires attribute @id. + + + gix.445 + MRQC missing-required-contents + empty(name) + + Element { name() } requires element name. + + + gix.445 + MRQC missing-required-contents + empty(address) + + Element { name() } requires element address. + + + gix.445 + MRQC missing-required-contents + empty(website) + + Element { name() } requires element website. + + + + + + + + + + + + + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@id) + + Element { name() } requires attribute @id. + + + + + + + + + + + gix.445 + MRQC missing-required-contents + empty(type) + + Element { name() } requires element type. + + + gix.445 + MRQC missing-required-contents + empty(memory) + + Element { name() } requires element memory. + + + + + + + + gix.445 + MRQC missing-required-contents + empty(product-name) + + Element { name() } requires element product-name. + + + gix.445 + MRQC missing-required-contents + empty(architecture) + + Element { name() } requires element architecture. + + + gix.445 + MRQC missing-required-contents + empty(speed) + + Element { name() } requires element speed. + + + + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@slot-no) + + Element { name() } requires attribute @slot-no. + + + gix.445 + MRQC missing-required-contents + empty(product-name) + + Element { name() } requires element product-name. + + + gix.445 + MRQC missing-required-contents + empty(type) + + Element { name() } requires element type. + + + + + + + + + + + gix.445 + MRQC missing-required-contents + empty(product-name) + + Element { name() } requires element product-name. + + + gix.445 + MRQC missing-required-contents + empty(byte-size) + + Element { name() } requires element byte-size. + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@socket-no) + + Element { name() } requires attribute @socket-no. + + + gix.445 + MRQC missing-required-contents + empty(product-name) + + Element { name() } requires element product-name. + + + gix.445 + MRQC missing-required-contents + empty(type) + + Element { name() } requires element type. + + + + + + + + + + + gix.445 + MRQC missing-required-contents + empty(product-name) + + Element { name() } requires element product-name. + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@currency) + + Element { name() } requires attribute @currency. + + + + + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@name) + + Element { name() } requires attribute @name. + + + gix.748 + MRQA missing-required-attribute + empty(@value) + + Element { name() } requires attribute @value. + + + + + + + + + + + + + + + + + + + + + + + + + + gix.445 + MRQC missing-required-contents + empty(fan|water) + + Element { name() } requires element fan|water. + + + + + + + + + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:string and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to string datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:anyURI and matches(.,'^[a-zA-Z][a-zA-Z0-9+\-.]+:.*\S$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to uri datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:dateTime and matches(.,'^(((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|(-((0[0-9]|1[0-2]):00|0[39]:30)|\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))$') and matches(.,'^(((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|(-((0[0-9]|1[0-2]):00|0[39]:30)|\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to date-time-with-timezone datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:nonNegativeInteger and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to non-negative-integer datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:positiveInteger and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to positive-integer datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:string and matches(.,'^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[45][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$') and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to uuid datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:decimal and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to decimal datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:string and matches(.,'^(\p{L}|_)(\p{L}|\p{N}|[.\-_])*$') and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to token datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:boolean and matches(.,'^true|1|false|0$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to boolean datatype. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-inspector.xsl b/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-inspector.xsl index 4865e3aa..f38ee0f5 100644 --- a/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-inspector.xsl +++ b/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-inspector.xsl @@ -1,11 +1,10 @@ - + exclude-result-prefixes="#all"> diff --git a/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-schema.xsd b/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-schema.xsd index 4fa290d5..193337c0 100644 --- a/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-schema.xsd +++ b/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-schema.xsd @@ -1,11 +1,10 @@ - + xmlns:m="http://csrc.nist.gov/ns/oscal/metaschema/1.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + elementFormDefault="qualified" + targetNamespace="http://example.com/ns/computer" + version="0.0.5"> Computer Model @@ -64,7 +63,7 @@ - + Vendor Identifier @@ -74,6 +73,16 @@ Vendor Identifier: An identifier for classifying a unique computer parts vendor. + + + + Vendor Reference + Instead of an identifier, a reference to another vendor by its @id. + + + Vendor Reference: Instead of an identifier, a reference to another vendor by its @id. + + @@ -122,9 +131,9 @@ + type="computer-vendor-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -150,17 +159,17 @@ + type="computer-vendor-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> + type="computer-product-name-FIELD" + minOccurs="1" + maxOccurs="1"/> + type="computer-cost-FIELD" + minOccurs="0" + maxOccurs="1"/> @@ -188,9 +197,9 @@ + type="computer-property-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -207,17 +216,17 @@ + type="computer-vendor-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> + type="computer-product-name-FIELD" + minOccurs="1" + maxOccurs="1"/> + type="computer-cost-FIELD" + minOccurs="0" + maxOccurs="1"/> @@ -232,9 +241,9 @@ + type="computer-property-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -271,17 +280,17 @@ + type="computer-vendor-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> + type="computer-product-name-FIELD" + minOccurs="1" + maxOccurs="1"/> + type="computer-cost-FIELD" + minOccurs="0" + maxOccurs="1"/> @@ -296,9 +305,9 @@ + type="computer-property-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -314,9 +323,9 @@ + type="computer-cooling-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -329,17 +338,17 @@ + type="computer-vendor-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> + type="computer-product-name-FIELD" + minOccurs="1" + maxOccurs="1"/> + type="computer-cost-FIELD" + minOccurs="0" + maxOccurs="1"/> @@ -354,9 +363,9 @@ + type="computer-property-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -406,21 +415,21 @@ + type="computer-vendor-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> + type="computer-product-name-FIELD" + minOccurs="1" + maxOccurs="1"/> + type="computer-cost-FIELD" + minOccurs="0" + maxOccurs="1"/> + type="computer-property-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -436,9 +445,9 @@ + type="computer-property-ASSEMBLY" + minOccurs="0" + maxOccurs="1"/> @@ -689,9 +698,9 @@ + type="listItemType" + minOccurs="1" + maxOccurs="unbounded"/> diff --git a/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-xmlschema.xsd b/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-xmlschema.xsd new file mode 100644 index 00000000..4fa290d5 --- /dev/null +++ b/src/schema-gen/InspectorXSLT/testing/current/computer_metaschema-xmlschema.xsd @@ -0,0 +1,952 @@ + + + + + Computer Model + 0.0.5 + computer + computer + + + + + + Vendor Information + Information about a vendor of a computer part. + + + Vendor Information: Information about a vendor of a computer part. + + + + + + + Vendor Name + The registered company name of the vendor. + + + Vendor Name: The registered company name of the vendor. + + + + + + + + + Vendor Address + The physical address of an office location for the vendor. + + + Vendor Address: The physical address of an office location for the vendor. + + + + + + + + + Vendor Website + A public website made by the vendor documenting their parts as used in the computer. + + + Vendor Website: A public website made by the vendor documenting their parts as used in the computer. + + + + + + + + + Vendor Identifier + An identifier for classifying a unique computer parts vendor. + + + Vendor Identifier: An identifier for classifying a unique computer parts vendor. + + + + + + + Product Name + The product name from the vendor of the computer part. + + + Product Name: The product name from the vendor of the computer part. + + + + + + + + Computer Assembly + A container object for a computer, its parts, and its sub-parts. + + + Computer Assembly: A container object for a computer, its parts, and its sub-parts. + + + + + + + Build Date and Time + The date and time the computer build was completed. + + + Build Date and Time: The date and time the computer build was completed. + + + + + + + + + Motherboard Assembly + A container object for a motherboard in a computer and its sub-parts. + + + Motherboard Assembly: A container object for a motherboard in a computer and its sub-parts. + + + + + + + + Motherboard Type + The type motherboard layout, at, atx, mini-itx or an alternative. + + + Motherboard Type: The type motherboard layout, at, atx, mini-itx or an alternative. + + + + + + + + + Motherboard Central Processing Unit (CPU) + The model number of the CPU on the motherboard of a computer. + + + Motherboard Central Processing Unit (CPU): The model number of the CPU on the motherboard of a computer. + + + + + + + + + + CPU Architecture + The Instruction Set Architecture (ISA) of the processor, x86, x86-64, arm, or an alternative. + + + CPU Architecture: The Instruction Set Architecture (ISA) of the processor, x86, x86-64, arm, or an alternative. + + + + + + + + + CPU Speed + The clock speed of the CPU in megahertz or gigahertz. + + + CPU Speed: The clock speed of the CPU in megahertz or gigahertz. + + + + + + + + + + + + + + Motherboard Advanced Technology Attachment (ATA) Socket + The model number of ATA socket on the motherboard of a computer. There will only be one socket on any motherboard. + + + Motherboard Advanced Technology Attachment (ATA) Socket: The model number of ATA socket on the motherboard of a computer. There will only be one socket on any motherboard. + + + + + + + + + + ATA Socket Type + The type of ATA socket on the motherboard , pata (parallel ATA), sata (Serial ATA), or an alternative. + + + ATA Socket Type: The type of ATA socket on the motherboard , pata (parallel ATA), sata (Serial ATA), or an alternative. + + + + + + + + + + + Serial Number + A code for this item only. No spaces are permitted. + + + Serial Number: A code for this item only. No spaces are permitted. + + + + + + Slot number + Must be distinctive among ata-sockets, and must be a value between zero (0) and the total number of slots. + + + Slot number: Must be distinctive among ata-sockets, and must be a value between zero (0) and the total number of slots. + + + + + + + + + Motherboard Random Access Memory (RAM) Module(s) + Random access memory hardware installed on the motherboard of a computer. + + + Motherboard Random Access Memory (RAM) Module(s): Random access memory hardware installed on the motherboard of a computer. + + + + + + + + + + Memory Module Size + Size of the memory module in binary, not SI base-10 units, meaning a kilobyte is 1024 bytes, not 1000 bytes. + + + Memory Module Size: Size of the memory module in binary, not SI base-10 units, meaning a kilobyte is 1024 bytes, not 1000 bytes. + + + + + + + + + + + Serial Number + A code for this item only. No spaces are permitted. + + + Serial Number: A code for this item only. No spaces are permitted. + + + + + + + + + + Motherboard Expansion Card + The model number of an expansion card connected to the motherboard of a computer. + + + Motherboard Expansion Card: The model number of an expansion card connected to the motherboard of a computer. + + + + + + + + + + Expansion Card Type + The type of expansion card on a motherboard of a computer, such as pci (PCI, e.g. Peripheral Component Interconnect), pcie (PCI Express), or an alternative. + + + Expansion Card Type: The type of expansion card on a motherboard of a computer, such as pci (PCI, e.g. Peripheral Component Interconnect), pcie (PCI Express), or an alternative. + + + + + + + + + + + Serial Number + A code for this item only. No spaces are permitted. + + + Serial Number: A code for this item only. No spaces are permitted. + + + + + + Socket Slot No + Identifies the expansion card's socket by its slot number. Note this should be a non-negative integer between 0 and the count of sockets, but this is not formally defined except on the target. + + + Socket Slot No: Identifies the expansion card's socket by its slot number. Note this should be a non-negative integer between 0 and the count of sockets, but this is not formally defined except on the target. + + + + + + + + + Serial Number + A code for this item only. No spaces are permitted. + + + Serial Number: A code for this item only. No spaces are permitted. + + + + + + + + + Universal Serial Bus Device + A USB expansion device. + + + Universal Serial Bus Device: A USB expansion device. + + + + + + + + + + + + USB Device Universally Unique Identifier + An identifier, based on a type 4 UUID, for the USB device. + + + USB Device Universally Unique Identifier: An identifier, based on a type 4 UUID, for the USB device. + + + + + + + + + + + Serial Number + A code for this item only. No spaces are permitted. + + + Serial Number: A code for this item only. No spaces are permitted. + + + + + + Computer Identifier + An identifier for classifying a unique make and model of computer. + + + Computer Identifier: An identifier for classifying a unique make and model of computer. + + + + + + + Part Cost + The price paid in the specified currency. + + + Part Cost: The price paid in the specified currency. + + + + + + + Currency Type + The type of currency. + + + Currency Type: The type of currency. + + + + + + + + + Remarks + Additional remarks related to the containing computer component. + + + Remarks: Additional remarks related to the containing computer component. + + + + + + + + + Property + An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. + + + Property: An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. + + + + + + Remarks + Additional remarks related to the containing computer component. + + + Remarks: Additional remarks related to the containing computer component. + + + + + + + + + + Property Name + A textual label, within a namespace, that uniquely identifies a specific attribute, characteristic, or quality of the property's containing object. + + + Property Name: A textual label, within a namespace, that uniquely identifies a specific attribute, characteristic, or quality of the property's containing object. + + + + + + Property Universally Unique Identifier + A unique identifier for a property. + + + Property Universally Unique Identifier: A unique identifier for a property. + + + + + + Property Namespace + A namespace qualifying the property's name. This allows different organizations to associate distinct semantics with the same name. + + + Property Namespace: A namespace qualifying the property's name. This allows different organizations to associate distinct semantics with the same name. + + + + + + Property Value + Indicates the value of the attribute, characteristic, or quality. + + + Property Value: Indicates the value of the attribute, characteristic, or quality. + + + + + + Property Class + A textual label that provides a sub-type or characterization of the property's name. + + + Property Class: A textual label that provides a sub-type or characterization of the property's name. + + + + + + Property Group + An identifier for relating distinct sets of properties. + + + Property Group: An identifier for relating distinct sets of properties. + + + + + + + Cooling + How the computer cools itself. + + + Cooling: How the computer cools itself. + + + + + + + + Fan + A fan header for a single fan; at least two fans are required for adequate cooling. + + + Fan: A fan header for a single fan; at least two fans are required for adequate cooling. + + + + + + + + Water + A cooling system using water for thermal regulation. + + + Water: A cooling system using water for thermal regulation. + + + + + Whether illuminated + The water system is illuminated for visual effect. + + + Whether illuminated: The water system is illuminated for visual effect. + + + + + + + + + + Serial Number + A code for this item only. No spaces are permitted. + + + Serial Number: A code for this item only. No spaces are permitted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The content model is the same as inlineMarkupType, but line endings need + to be preserved, since this is pre-formatted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An insert can be used to identify a placeholder for dynamically inserting text related to a specific object, which is referenced by the object's identifier using an id-ref. This insert mechanism allows the selection of which text value from the object to dynamically include based on the application's display requirements. + + + + The type of object to include from (e.g., parameter, control, component, role, etc.) + + + + + The identity of the object to insert a value for. The identity will be selected from the index of objects of the specified type. The specific value to include is based on the application's display requirements, which will likely use a specific data element associated with the type (e.g., title, identifier, value, etc.) that is appropriate for the application. + + + + + + A binary value that is either: true (or 1) or false (or 0). + + + + + + + + A string representing a point in time with an optional timezone. + + + + + + + + A string representing a point in time with a required timezone. + + + + + + + + A real number expressed using a whole and optional fractional part + separated by a period. + + + + + This pattern ensures that leading and trailing whitespace is + disallowed. This helps to even the user experience between implementations + related to whitespace. + + + + + + + An integer value that is equal to or greater than 0. + + + + + This pattern ensures that leading and trailing whitespace is + disallowed. This helps to even the user experience between implementations + related to whitespace. + + + + + + + An integer value that is greater than 0. + + + + + This pattern ensures that leading and trailing whitespace is + disallowed. This helps to even the user experience between implementations + related to whitespace. + + + + + + + A non-empty string of Unicode characters with leading and trailing whitespace + disallowed. Whitespace is: U+9, U+10, U+32 or [ \n\t]+ + + + + The 'string' datatype restricts the XSD type by prohibiting leading + and trailing whitespace, and something (not only whitespace) is required. + + + + + This pattern ensures that leading and trailing whitespace is + disallowed. This helps to even the user experience between implementations + related to whitespace. + + + + + + + + A non-empty, non-colonized name as defined by XML Schema Part 2: Datatypes + Second Edition (https://www.w3.org/TR/xmlschema11-2/#NCName), with leading and trailing + whitespace disallowed. + + + + + + A single token may not contain whitespace. + + + + + + + + A universal resource identifier (URI) formatted according to RFC3986. + + + + + Requires a scheme with colon per RFC 3986. + + + + + + + A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC + 4122. + + + + + A sequence of 8-4-4-4-12 hex digits, with extra + constraints in the 13th and 17-18th places for version 4 and 5 + + + + + + diff --git a/src/schema-gen/InspectorXSLT/testing/current/tiny_inspector.xsl b/src/schema-gen/InspectorXSLT/testing/current/tiny_inspector.xsl new file mode 100644 index 00000000..44cb4883 --- /dev/null +++ b/src/schema-gen/InspectorXSLT/testing/current/tiny_inspector.xsl @@ -0,0 +1,889 @@ + + + + + + + + + inspected + + full + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + av.152 + _UE unmatched-element + Unrecognized element { name() }. + + + + + + + + + + + + + + av.180 + _UT unexpected-text + Errant text content. + + + + + + + av.193 + _UA unmatched-attribute + Unrecognized attribute @{ name() } on element { name(..) }. + + + + + + + + + + exists(.) + + __U uncategorized + * + [info] + ERROR + + + + + + + + + + + + + + + + + + [info] + + + + + + + + + /{ name() } + + + + + /{ name() }[{ mx:element-position(.)[count($kin) gt 1] }] + + + + /@{ name() } + + + + + [{ count(preceding-sibling::text()|.) }] + /text(){ (count($kin)[. gt 1]) ! $place } + + + + + [{ count(preceding-sibling::comment()|.) }] + /text(){ (count($kin)[. gt 1]) ! $place } + + + + + [{ count(preceding-sibling::processing-instruction()|.) + }] + /text(){ (count($kin)[. gt 1]) ! $place } + + + + + + + + + + + { $as } + { $as }s + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File { replace(@src,'.*/','') } has { $error-count } { + mx:pluralize($error-count,'error')}. + File { replace(@src,'.*/','') } has { $report-count } { + mx:pluralize($report-count,'issue') } reported including { $error-count } { + mx:pluralize($error-count,'error')}. + + + + + + + + + + File { replace(@src,'.*/','') } is reported VALID, no issues ... + + + + + + + + + + + + + + + + + + + + + + + + + { (@level,'ERROR')[1] } [CLASS) { @class } ][PATH) { @xpath } ][REPORT) { + string(.) }] + + + + + + + + + + + + { $validating-filename } - { $checked } - { mx:metaschema/@shortname } validation + + + + + + +

{ $checked } Validating { $validating-filename } - { mx:metaschema } - found { + 'IN'[not($reported-valid)] }VALID

+ + +

+ { $validating-filename } contains { @elements} { + mx:pluralize(@elements/number(),'element') } and { @attributes } { + mx:pluralize(@attributes/number(),'attribute') }.

+ + +
+ +
+
+
+ + +
+ + + + + + +
+

{ count(.//mx:report) } { mx:pluralize(count(.//mx:report),'issue') } reported.

+

+ + 💥 + +

+
+
+ +
+

Good news - nothing to report - the instance is valid. 🚀 +

+
+
+ + + + +
+ + + +

{ @class }{ @level[not(.='ERROR')] ! (' ' || .) }

+
    + +
  • Rule ID: { . } +
  • +
    +
  • test: { @test } +
  • + +
  • matching: { @matching } +
  • +
    +
  • XPath: { @xpath } +
  • +
+
+
+ + + + + + + + + + + + + + + + + { codepoints-to-string(10) } + + + + + + + { $lf } + + + + { $lf2 }--- + + + + # + + + + + { $lf2 }# + + + + + { $lf2 }## + + + + + { $lf2 }### + + + + + { $lf2 } + + + + + + + + + { $lf }- + + + + ** + + ** + + + * + + * + + + ` + + ` + + + Computer Model + + + + + + + + + + + + + + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::notes) + + Element part is unexpected following notes/note. + + + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::note) + + Element part is unexpected following note. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::title) gt 1 + + Element title appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element title is unexpected following term, stuff, part, or notes/note. + + + + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element term is unexpected following stuff, part, or notes/note. + + + + + + + + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::title) gt 1 + + Element title appears too many times: 1 maximum is permitted. + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element title is unexpected following term, stuff, part, or note. + + + + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element term is unexpected following stuff, part, or note. + + + + + + + + + gix.347 + EATO element-appears-too-often + count(. | preceding-sibling::note) gt 1 + + Element note appears too many times: 1 maximum is permitted. + + + + + + + + + + + + + + + + + + gix.108 + EOOP element-out-of-place + Element { name() } is not permitted here. + + + + + gix.117 + AOOP attribute-out-of-place + Attribute @{ name() } is not permitted here. + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@id) + + Element { name() } requires attribute @id. + + + gix.445 + MRQC missing-required-contents + empty(title) + + Element { name() } requires element title. + + + + + + + + + + + + + + gix.748 + MRQA missing-required-attribute + empty(@id) + + Element { name() } requires attribute @id. + + + + + + + + + + + + gix.445 + MRQC missing-required-contents + empty(title) + + Element { name() } requires element title. + + + + + + + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:string and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to string datatype. + + + + + VDSX violates-datatype-syntax + + + gix.148 + + + { $class } + not(string(.) castable as xs:string and matches(.,'^(\p{L}|_)(\p{L}|\p{N}|[.\-_])*$') and matches(.,'^\S(.*\S)?$')) + + Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to token datatype. + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::part | preceding-sibling::notes) + + Element stuff is unexpected following part or notes/note. + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::part | preceding-sibling::note) + + Element stuff is unexpected following part or note. + + + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element title is unexpected following term, stuff, part, or notes/note. + + + + + gix.390 + EOOO element-out-of-order + exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + + Element title is unexpected following term, stuff, part, or note. + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-inspector.xsl b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-inspector.xsl index 44cb4883..79fffe88 100644 --- a/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-inspector.xsl +++ b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-inspector.xsl @@ -1,11 +1,10 @@ - + xmlns:mx="http://csrc.nist.gov/ns/csd/metaschema-xslt" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="3.0" + xpath-default-namespace="http://example.com/ns/tinydata" + exclude-result-prefixes="#all"> @@ -21,29 +20,29 @@ + priority="100" + name="xsl:initial-template" + match="root()"> + priority="101" + match="root()[$format=('mx','mx-report')]"> + priority="101" + match="root()[$format=('html','webpage')]"> + priority="101" + match="root()[$format=('md','markdown')]"> + priority="101" + match="root()[$format=('plaintext','plain','text')]"> @@ -87,9 +86,9 @@ + tunnel="true" + as="xs:string" + select="codepoints-to-string(10)"/>
@@ -100,8 +99,8 @@ + on-no-match="fail" + on-multiple-match="use-last"/> @@ -134,14 +133,14 @@ + match="a/@href | a/@title | img/@alt | img/@src | img/@title | code/@class | insert/@id-ref | insert/@type (: other legal attributes :)"/> + match="p/br | li/br | h1/br | h2/br | h3/br | h4/br | h5/br | h6/br | pre/br | tr/br | td/br"/> + match="p/text() | li/text() | h1/text() | h2/text() | h3/text() | h4/text() | h5/text() | h6/text() | pre/text() | blockquote/text() | th/text() | td/text()"/> + match="em/text() | i/text() | strong/text() | b/text() | u/text() | q/text() | code/text() | a/text() | sub/text() | sup/text()"/> @@ -151,7 +150,7 @@ + select=" 'p', 'pre', 'ul', 'ol', 'table', 'h1', 'h2', 'h3', 'h4', 'h5'"/> @@ -161,8 +160,8 @@ + mode="test" + match="@xsi:*"/> @@ -181,10 +180,10 @@ + test="{ $testing }" + class="{$class}" + xpath="{ $xpath }" + level="{ $level }"> @@ -208,7 +207,7 @@ /{ name() } + match="*[node-name() = (../* except current())/node-name()]"> /{ name() }[{ mx:element-position(.)[count($kin) gt 1] }] @@ -271,11 +270,11 @@ + priority="103" + mode="grab-mx"> + select="count(.//mx:report[@level = ('CRITICAL', 'ERROR')])"/> @@ -291,8 +290,8 @@ + priority="102" + mode="grab-mx"> File { replace(@src,'.*/','') } is reported VALID, no issues ... @@ -304,22 +303,22 @@ + select="count(descendant::* except .//mx:*/descendant-or-self::*)"/> + select="count(descendant::*/@* except .//mx:*/descendant-or-self::*/@*)"/> + select="count(.//mx:report[@level = ('CRITICAL', 'ERROR')])"/> + mode="grab-mx"> + mode="grab-mx"> @@ -437,109 +436,109 @@ details p { margin: 0.2em 0em } { codepoints-to-string(10) } + match="html" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> + match="style" + xpath-default-namespace="http://www.w3.org/1999/xhtml"/> + match="body" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> { $lf } + match="div | details" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> { $lf2 }--- + match="body/*[1]/self::h1" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> # + match="h1" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> { $lf2 }# + match="h2" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> { $lf2 }## + match="h3 | details/summary" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> { $lf2 }### + match="p" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> { $lf2 } + match="ul" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> + match="li" + expand-text="true" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> { $lf }- + match="b" + priority="2" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> ** ** + match="i" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> * * + match="code" + priority="2" + xpath-default-namespace="http://www.w3.org/1999/xhtml"> ` ` Computer Model + shortname="computer" + namespace="http://example.com/ns/tinydata">Computer Model @@ -594,7 +593,7 @@ details p { margin: 0.2em 0em } EOOO element-out-of-order exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + select="exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p)"/> Element title is unexpected following term, stuff, part, or notes/note. @@ -608,7 +607,7 @@ details p { margin: 0.2em 0em } EOOO element-out-of-order exists(preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + select="exists(preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p)"/> Element term is unexpected following stuff, part, or notes/note. @@ -636,7 +635,7 @@ details p { margin: 0.2em 0em } EOOO element-out-of-order exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + select="exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p)"/> Element title is unexpected following term, stuff, part, or note. @@ -650,7 +649,7 @@ details p { margin: 0.2em 0em } EOOO element-out-of-order exists(preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + select="exists(preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p)"/> Element term is unexpected following stuff, part, or note. @@ -762,12 +761,12 @@ details p { margin: 0.2em 0em } gix.148 + as="xs:string" + select="($matching[matches(.,'\S')],'*')[1]"/> { $class } not(string(.) castable as xs:string and matches(.,'^\S(.*\S)?$')) + select="not(string(.) castable as xs:string and matches(.,'^\S(.*\S)?$'))"/> Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to string datatype. @@ -779,111 +778,111 @@ details p { margin: 0.2em 0em } gix.148 + as="xs:string" + select="($matching[matches(.,'\S')],'*')[1]"/> { $class } not(string(.) castable as xs:string and matches(.,'^(\p{L}|_)(\p{L}|\p{N}|[.\-_])*$') and matches(.,'^\S(.*\S)?$')) + select="not(string(.) castable as xs:string and matches(.,'^(\p{L}|_)(\p{L}|\p{N}|[.\-_])*$') and matches(.,'^\S(.*\S)?$'))"/> Value { string(.) } of { if (self::element()) then 'element' else 'attribute' } { self::attribute()/'@' }{ name(.) } does not conform to token datatype. + match="title/a|title/insert|title/br|title/code|title/em|title/i|title/b|title/strong|title/sub|title/sup|title/q|title/img"/> + match="TINY/h1|TINY/h2|TINY/h3|TINY/h4|TINY/h5|TINY/h6|TINY/table|TINY/img|TINY/pre|TINY/hr|TINY/blockquote|TINY/ul|TINY/ol|TINY/p"> gix.390 EOOO element-out-of-order exists(preceding-sibling::part | preceding-sibling::notes) + select="exists(preceding-sibling::part | preceding-sibling::notes)"/> Element stuff is unexpected following part or notes/note. + match="part/h1|part/h2|part/h3|part/h4|part/h5|part/h6|part/table|part/img|part/pre|part/hr|part/blockquote|part/ul|part/ol|part/p"> gix.390 EOOO element-out-of-order exists(preceding-sibling::part | preceding-sibling::note) + select="exists(preceding-sibling::part | preceding-sibling::note)"/> Element stuff is unexpected following part or note. + match="TINY/notes/note/h1|TINY/notes/note/h2|TINY/notes/note/h3|TINY/notes/note/h4|TINY/notes/note/h5|TINY/notes/note/h6|TINY/notes/note/table|TINY/notes/note/img|TINY/notes/note/pre|TINY/notes/note/hr|TINY/notes/note/blockquote|TINY/notes/note/ul|TINY/notes/note/ol|TINY/notes/note/p"/> + match="part/note/h1|part/note/h2|part/note/h3|part/note/h4|part/note/h5|part/note/h6|part/note/table|part/note/img|part/note/pre|part/note/hr|part/note/blockquote|part/note/ul|part/note/ol|part/note/p"/> + match="TINY/title/a|TINY/title/insert|TINY/title/br|TINY/title/code|TINY/title/em|TINY/title/i|TINY/title/b|TINY/title/strong|TINY/title/sub|TINY/title/sup|TINY/title/q|TINY/title/img"> gix.390 EOOO element-out-of-order exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + select="exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::notes | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p)"/> Element title is unexpected following term, stuff, part, or notes/note. + match="part/title/a|part/title/insert|part/title/br|part/title/code|part/title/em|part/title/i|part/title/b|part/title/strong|part/title/sub|part/title/sup|part/title/q|part/title/img"> gix.390 EOOO element-out-of-order exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p) + select="exists(preceding-sibling::term | preceding-sibling::part | preceding-sibling::note | preceding-sibling::h1 | preceding-sibling::h2 | preceding-sibling::h3 | preceding-sibling::h4 | preceding-sibling::h5 | preceding-sibling::h6 | preceding-sibling::table | preceding-sibling::img | preceding-sibling::pre | preceding-sibling::hr | preceding-sibling::blockquote | preceding-sibling::ul | preceding-sibling::ol | preceding-sibling::p)"/> Element title is unexpected following term, stuff, part, or note. + match="h1/a|h2/a|h3/a|h4/a|h5/a|h6/a|table/a|pre/a|blockquote/a|ul/a|ol/a|p/a"/> + match="a/a|insert/a|code/a|em/a|i/a|b/a|strong/a|sub/a|sup/a|q/a"/> + match="h1/insert|h2/insert|h3/insert|h4/insert|h5/insert|h6/insert|table/insert|pre/insert|blockquote/insert|ul/insert|ol/insert|p/insert"/> + match="a/insert|insert/insert|code/insert|em/insert|i/insert|b/insert|strong/insert|sub/insert|sup/insert|q/insert"/> + match="h1/br|h2/br|h3/br|h4/br|h5/br|h6/br|table/br|pre/br|blockquote/br|ul/br|ol/br|p/br"/> + match="a/br|insert/br|code/br|em/br|i/br|b/br|strong/br|sub/br|sup/br|q/br"/> + match="h1/code|h2/code|h3/code|h4/code|h5/code|h6/code|table/code|pre/code|blockquote/code|ul/code|ol/code|p/code"/> + match="a/code|insert/code|code/code|em/code|i/code|b/code|strong/code|sub/code|sup/code|q/code"/> + match="h1/em|h2/em|h3/em|h4/em|h5/em|h6/em|table/em|pre/em|blockquote/em|ul/em|ol/em|p/em"/> + match="a/em|insert/em|code/em|em/em|i/em|b/em|strong/em|sub/em|sup/em|q/em"/> + match="h1/i|h2/i|h3/i|h4/i|h5/i|h6/i|table/i|pre/i|blockquote/i|ul/i|ol/i|p/i"/> + match="a/i|insert/i|code/i|em/i|i/i|b/i|strong/i|sub/i|sup/i|q/i"/> + match="h1/b|h2/b|h3/b|h4/b|h5/b|h6/b|table/b|pre/b|blockquote/b|ul/b|ol/b|p/b"/> + match="a/b|insert/b|code/b|em/b|i/b|b/b|strong/b|sub/b|sup/b|q/b"/> + match="h1/strong|h2/strong|h3/strong|h4/strong|h5/strong|h6/strong|table/strong|pre/strong|blockquote/strong|ul/strong|ol/strong|p/strong"/> + match="a/strong|insert/strong|code/strong|em/strong|i/strong|b/strong|strong/strong|sub/strong|sup/strong|q/strong"/> + match="h1/sub|h2/sub|h3/sub|h4/sub|h5/sub|h6/sub|table/sub|pre/sub|blockquote/sub|ul/sub|ol/sub|p/sub"/> + match="a/sub|insert/sub|code/sub|em/sub|i/sub|b/sub|strong/sub|sub/sub|sup/sub|q/sub"/> + match="h1/sup|h2/sup|h3/sup|h4/sup|h5/sup|h6/sup|table/sup|pre/sup|blockquote/sup|ul/sup|ol/sup|p/sup"/> + match="a/sup|insert/sup|code/sup|em/sup|i/sup|b/sup|strong/sup|sub/sup|sup/sup|q/sup"/> + match="h1/q|h2/q|h3/q|h4/q|h5/q|h6/q|table/q|pre/q|blockquote/q|ul/q|ol/q|p/q"/> + match="a/q|insert/q|code/q|em/q|i/q|b/q|strong/q|sub/q|sup/q|q/q"/> + match="h1/img|h2/img|h3/img|h4/img|h5/img|h6/img|table/img|pre/img|blockquote/img|ul/img|ol/img|p/img"/> + match="a/img|insert/img|code/img|em/img|i/img|b/img|strong/img|sub/img|sup/img|q/img"/> diff --git a/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-schema.xsd b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-schema.xsd index 8abaa3d5..ee5828b7 100644 --- a/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-schema.xsd +++ b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-schema.xsd @@ -1,11 +1,10 @@ - + xmlns:m="http://csrc.nist.gov/ns/oscal/metaschema/1.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + elementFormDefault="qualified" + targetNamespace="http://example.com/ns/tinydata" + version="0.0.5"> Computer Model @@ -30,18 +29,18 @@ + type="computer-title-FIELD" + minOccurs="1" + maxOccurs="1"/> + type="computer-term-FIELD" + minOccurs="0" + maxOccurs="unbounded"/> + type="computer-part-ASSEMBLY" + minOccurs="0" + maxOccurs="unbounded"/> @@ -134,18 +133,18 @@ + type="computer-title-FIELD" + minOccurs="1" + maxOccurs="1"/> + type="computer-term-FIELD" + minOccurs="0" + maxOccurs="unbounded"/> + type="computer-part-ASSEMBLY" + minOccurs="0" + maxOccurs="unbounded"/> @@ -208,9 +207,9 @@ + type="listItemType" + minOccurs="1" + maxOccurs="unbounded"/> diff --git a/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-xmlschema.xsd b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-xmlschema.xsd new file mode 100644 index 00000000..8abaa3d5 --- /dev/null +++ b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema-xmlschema.xsd @@ -0,0 +1,377 @@ + + + + + Computer Model + 0.0.5 + computer + +

Tiny Metaschema

+

A metaschema can be small and yet deep.

+
+ TINY +
+
+ + + + + Tiny Data + A minimally described data set. + + + Tiny Data: A minimally described data set. + + + + + + + + + + + + + Note + Wrapped markup-multiline example. + + + Note: Wrapped markup-multiline example. + + + + + + + + + + + + + Tiny ID + An identifier. + + + Tiny ID: An identifier. + + + + + + + Title + markup-line example. + + + Title: markup-line example. + + + + + + + + + Term + Simple string value example. + + + Term: Simple string value example. + + + + + + + Term identifier + A token identifying this term uniquely within the document. + + + Term identifier: A token identifying this term uniquely within the document. + + + + + + + + + Note + Wrapped markup-multiline example. + + + Note: Wrapped markup-multiline example. + + + + + + + + + Tiny part + A bit of tiny data. + + + Tiny part: A bit of tiny data. + + + + + + + + + + Note + Wrapped markup-multiline example. + + + Note: Wrapped markup-multiline example. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The content model is the same as inlineMarkupType, but line endings need + to be preserved, since this is pre-formatted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An insert can be used to identify a placeholder for dynamically inserting text related to a specific object, which is referenced by the object's identifier using an id-ref. This insert mechanism allows the selection of which text value from the object to dynamically include based on the application's display requirements. + + + + The type of object to include from (e.g., parameter, control, component, role, etc.) + + + + + The identity of the object to insert a value for. The identity will be selected from the index of objects of the specified type. The specific value to include is based on the application's display requirements, which will likely use a specific data element associated with the type (e.g., title, identifier, value, etc.) that is appropriate for the application. + + + + + + A non-empty string of Unicode characters with leading and trailing whitespace + disallowed. Whitespace is: U+9, U+10, U+32 or [ \n\t]+ + + + + The 'string' datatype restricts the XSD type by prohibiting leading + and trailing whitespace, and something (not only whitespace) is required. + + + + + This pattern ensures that leading and trailing whitespace is + disallowed. This helps to even the user experience between implementations + related to whitespace. + + + + + + + + A non-empty, non-colonized name as defined by XML Schema Part 2: Datatypes + Second Edition (https://www.w3.org/TR/xmlschema11-2/#NCName), with leading and trailing + whitespace disallowed. + + + + + + A single token may not contain whitespace. + + + + + +
diff --git a/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema_COMPOSED-metaschema.xml b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema_COMPOSED-metaschema.xml new file mode 100644 index 00000000..7a0e9648 --- /dev/null +++ b/src/schema-gen/InspectorXSLT/testing/current/tiny_metaschema_COMPOSED-metaschema.xml @@ -0,0 +1,242 @@ + + + Seeing assembly#computer:TINY, field#computer:title, field#computer:term, assembly#computer:part, field#computer:note + Computer Model + 0.0.5 + computer + http://example.com/ns/tinydata + http://example.com/ns/tinydata + +

Tiny Metaschema

+

A metaschema can be small and yet deep.

+
+ + Tiny Data + A minimally described data set. + TINY + + Tiny ID + An identifier. + + + + + + Stuff + Some amount of tiny stuff. + + + + + + + + + + + Title + markup-line example. + + + Term + Simple string value example. + + + + + Note + Wrapped markup-multiline example. + + + Tiny part + A bit of tiny data. + + + + + Stuff + Some amount of tiny stuff. + + + + + + + +
diff --git a/src/schema-gen/InspectorXSLT/testing/generate-oscal-catalog-inspector.sh b/src/schema-gen/InspectorXSLT/testing/generate-oscal-catalog-inspector.sh new file mode 100644 index 00000000..9e1eca52 --- /dev/null +++ b/src/schema-gen/InspectorXSLT/testing/generate-oscal-catalog-inspector.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Simple invocation of the pipeline OSCAL-INSPECTOR-XSLT.xpl +# which hard-wires the production of InspectorXSLT for OSCAL formats (currently catalog) + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "$SCRIPT_DIR/../../../common/subcommand_common.bash" + +usage() { + cat <&2 + exit 1 +fi + +ADDITIONAL_ARGS=$(echo "${*// /\\ }") + +PIPELINE="${SCRIPT_DIR}/OSCAL-INSPECTOR-XSLT.xpl" + +CALABASH_ARGS="$ADDITIONAL_ARGS \"$PIPELINE\"" + +invoke_calabash "${CALABASH_ARGS}" diff --git a/src/schema-gen/InspectorXSLT/testing/refresh-computer-inspector.sh b/src/schema-gen/InspectorXSLT/testing/refresh-computer-inspector.sh index f010ebbf..533c6788 100644 --- a/src/schema-gen/InspectorXSLT/testing/refresh-computer-inspector.sh +++ b/src/schema-gen/InspectorXSLT/testing/refresh-computer-inspector.sh @@ -28,8 +28,18 @@ ADDITIONAL_ARGS=$(echo "${*// /\\ }") CALABASH_ARGS="-oINSPECTOR-XSLT=\"$XSLT_RESULT\" $ADDITIONAL_ARGS \"${XPROC_FILE}\"" -# echo "${CALABASH_ARGS}" +## show usage if a first argument is '-h', expanding $1 to '' if not set +if [ "${1:-}" = '-h' ] || [ "${1:-}" = '--help' ]; + +then + + usage +else + +# echo "${CALABASH_ARGS}" invoke_calabash "${CALABASH_ARGS}" -echo Computer Model Inspector XSLT refreshed - check - \ No newline at end of file +echo Computer Model Inspector XSLT refreshed - check - + +fi diff --git a/src/schema-gen/InspectorXSLT/testing/refresh-test-inspectors.sh b/src/schema-gen/InspectorXSLT/testing/refresh-test-inspectors.sh index ac4841f1..fc72d481 100644 --- a/src/schema-gen/InspectorXSLT/testing/refresh-test-inspectors.sh +++ b/src/schema-gen/InspectorXSLT/testing/refresh-test-inspectors.sh @@ -26,8 +26,20 @@ ADDITIONAL_ARGS=$(echo "${*// /\\ }") # -iMETASCHEMA=computer_metaschema.xml -iMETASCHEMA=tiny_metaschema.xml CALABASH_ARGS="$ADDITIONAL_ARGS \"${XPROC_FILE}\"" + + +## show usage if a first argument is '-h', expanding $1 to '' if not set +if [ "${1:-}" = '-h' ] || [ "${1:-}" = '--help' ]; + +then + + usage + +else + # echo "${CALABASH_ARGS}" invoke_calabash "${CALABASH_ARGS}" -# invoke_calabash "-iMETASCHEMA=computer_metaschema.xml -iMETASCHEMA=tiny_metaschema.xml "${CALABASH_ARGS}" echo Current test models refreshed - InspectorXSLT and XSD - check 'current' + +fi \ No newline at end of file diff --git a/src/schema-gen/InspectorXSLT/testing/smoketest-computer-inspector.sh b/src/schema-gen/InspectorXSLT/testing/smoketest-computer-inspector.sh index db1e7d32..ca39ee68 100644 --- a/src/schema-gen/InspectorXSLT/testing/smoketest-computer-inspector.sh +++ b/src/schema-gen/InspectorXSLT/testing/smoketest-computer-inspector.sh @@ -26,7 +26,17 @@ ADDITIONAL_ARGS=$(echo "${*// /\\ }") CALABASH_ARGS="-oINSPECTOR-XSLT=/dev/null $ADDITIONAL_ARGS \"${XPROC_FILE}\"" # echo "${CALABASH_ARGS}" +## show usage if a first argument is '-h', expanding $1 to '' if not set +if [ "${1:-}" = '-h' ] || [ "${1:-}" = '--help' ]; + +then + + usage + +else invoke_calabash "${CALABASH_ARGS}" -echo Computer Model Inspector XSLT produced and run - without apparent error \ No newline at end of file +echo Computer Model Inspector XSLT produced and run - without apparent error + +fi diff --git a/src/schema-gen/InspectorXSLT/testing/tests/inspector-functional-xspec/xspec-patterns.xspec b/src/schema-gen/InspectorXSLT/testing/tests/inspector-functional-xspec/xspec-patterns.xspec index c3fb7592..0185d4a8 100644 --- a/src/schema-gen/InspectorXSLT/testing/tests/inspector-functional-xspec/xspec-patterns.xspec +++ b/src/schema-gen/InspectorXSLT/testing/tests/inspector-functional-xspec/xspec-patterns.xspec @@ -91,6 +91,7 @@ Modes to test:
+ diff --git a/src/schema-gen/JSON-schema/Makefile b/src/schema-gen/JSON-schema/Makefile new file mode 100644 index 00000000..807f1632 --- /dev/null +++ b/src/schema-gen/JSON-schema/Makefile @@ -0,0 +1,52 @@ +include ../../testing/make_common.mk + +# INCLUDES: +# unit-test - unit testing - XSLT production templates for InspectorXSLT +# spec-test - specification conformance testing - functional runtime tests of the generated XSLT +# xspec - run XSpec tests in designated folder +# clean - clean up designated output folder + +# for smoke testing see ../Makefile + +# tbd - 'field testing' applying result JSON Schema to known 'working and broken' instances + +module_path:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +output_folder:=$(module_path)/test_output +xspec_script=$(realpath $(module_path)/../../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch-quiet.sh) +xspec_ci_script=$(realpath $(module_path)/../../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch.sh) +folder=. + +.PHONY: test +test: unit-test spec-test ## Run all tests + + +.PHONY: spec-test +spec-test: ## Run all specification tests + LOGFILE="$(output_folder)/jsonschemagen-mapping.log" $(xspec_ci_script) \ + "folder=$(module_path)/testing/tests/jsonschemagen-mapping-xspec/" \ + "report-to=$(output_folder)/jsonschemagen-mapping_report.html" \ + "junit-to=$(output_folder)/jsonschemagen-mapping_junit-report.xml" \ + "stop-on-error=yes" \ + "recurse=yes" + +.PHONY: unit-test +unit-test: ## Run all unit tests + LOGFILE="$(output_folder)/jsonschemagen-runtime.log" $(xspec_ci_script) \ + "folder=$(module_path)/testing/tests/jsonschemagen-runtime-xspec" \ + "report-to=$(output_folder)/jsonschemagen-runtime_report.html" \ + "junit-to=$(output_folder)/jsonschemagen-runtime_junit-report.xml" \ + "stop-on-error=yes" \ + "recurse=yes" + +.PHONY: xspec +xspec: ## Run all *.xspec in a designated folder, quietly - use folder=[folder] + LOGFILE="$(output_folder)/$(folder)-xspec-tests.log" $(xspec_script) \ + "baseURI=file:$(module_path)/" \ + "folder=$(folder)" \ + "report-to=$(output_folder)/inspector-$(folder)-tests_report.html" \ + "stop-on-error=no" \ + "recurse=yes" + +.PHONY: clean +clean: ## Remove test output + rm -fr $(output_folder)/* \ No newline at end of file diff --git a/src/schema-gen/JSON-schema/choice-split.xsl b/src/schema-gen/JSON-schema/choice-split.xsl new file mode 100644 index 00000000..6c2b618a --- /dev/null +++ b/src/schema-gen/JSON-schema/choice-split.xsl @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/schema-gen/JSON-schema/make-json-schema-metamap.xsl b/src/schema-gen/JSON-schema/make-json-schema-metamap.xsl index c0c54878..d022c957 100644 --- a/src/schema-gen/JSON-schema/make-json-schema-metamap.xsl +++ b/src/schema-gen/JSON-schema/make-json-schema-metamap.xsl @@ -145,8 +145,11 @@ - - + + + object @@ -156,7 +159,59 @@ - + + + + + + + + + + + + + object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -167,6 +222,7 @@ + @@ -199,8 +255,6 @@ - - @@ -216,6 +270,7 @@ + @@ -281,6 +336,8 @@ + + @@ -296,7 +353,7 @@ + $with-model/(field|define-field|assembly|define-assembly)[@min-occurs > 0]"/> @@ -305,7 +362,7 @@ - true + true false @@ -425,8 +482,8 @@ + assembly[group-as/@in-json='BY_KEY'][exists(key('assembly-definition-by-name',@_key-ref, $composed-metaschema)/json-key)] | + field[group-as/@in-json='BY_KEY'][exists(key('field-definition-by-name', @_key-ref, $composed-metaschema)/json-key)]"> object @@ -444,7 +501,7 @@ - + @@ -453,7 +510,7 @@ - + @@ -509,17 +566,17 @@ - + - + - + @@ -550,8 +607,8 @@ - - + + string diff --git a/src/schema-gen/JSON-schema/testing.md b/src/schema-gen/JSON-schema/testing.md new file mode 100644 index 00000000..9e90c370 --- /dev/null +++ b/src/schema-gen/JSON-schema/testing.md @@ -0,0 +1,73 @@ +# Testing Metaschema-XSLT JSON Schema production + +**Currently only JSON Schema v7 is supported.** + +At a future date we aim to support other forms. + +## Smoke testing + +A JSON Schema, with other schemas, is produced by a pipeline in the parent directory, ../METASCHEMA-ALL-SCHEMAS.xpl, which is also run as a smoke test. + +``` +pushd .. +make smoke-test +popd +``` + +The smoke test outputs including a JSON Schema are found in the `test_output` folder (until/unless cleaned out). If a JSON instance cannot be produced, the process will fail. +The smoke test does *not* currently + +- test that the JSON functions as a JSON Schema +- test that it conforms to an idea of a JSON Schema ('the standard') or JSON Schema usage patterns + +It does, however, confirm that the process terminated successfully with a file output in the expected location. + + +## Spec testing + +In this case, 'spec testing' is testing to see whether the resulting JSON Schema looks like what we think it should look like, in detail. + +## Unit testing + +Unit tests here focus on end-to-end testing, i.e. per-metaschema mappings from single model input to single JSON Schema output. + +The unit testing here is *less* granular than the specification testing. + +Neither of these actually test the JSON Schema, only the way in which one is produced. + + +This implies near-term and longer-term goals: + +# JSON Schema generation - planning + +## Near-term + +Even without running the JSON Schema (a 'field-test' to demonstrate its adequacy for the purpose, i.e. validation), we can test a great deal since we know what that JSON Schema should look like. + +I.e., we can test the mapping of Metaschema semantics into JSON by sketching the transformation from Metaschema source to the JSON Schema in its XML precursor format. + +- [ ] XSpec the XSLT + - [ ] `make-json-schema-metamap.xsl` for unit testing + - [ ] `../nist-metaschema-MAKE-JSON-SCHEMA-as-xml.xsl` with @external='true' for end to end +- [ ] Flesh out with micro-examples of special cases +- [ ] Deal with `choice` https://github.com/usnistgov/metaschema-xslt/issues/105 + +cf https://github.com/usnistgov/OSCAL/issues/1989 + +This will give us something to show that we can generate correct outputs, for given inputs, in the general case. + +Note that in this repo, the OSCAL models will *not* be used. + +(But it can be used in parallel work in the oscal-xslt repository.) + +## Longer-term + +"Field test" script able to distinguish between expected-valid and expected-invalid JSON, and report findings. + +Something that could be reused in oscal-xslt over OSCAL inputs, for example. + +## Punchlist + +- [ ] XSpec to test metamap XSLT +- [x] Makefile to run this XSpec using xspec-dev script cf ../InspectorXSLT/Makefile +- [ ] Show tests with proposed solution(s) via PR \ No newline at end of file diff --git a/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/choice-splitting.xspec b/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/choice-splitting.xspec new file mode 100644 index 00000000..38c94ca5 --- /dev/null +++ b/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/choice-splitting.xspec @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/metamap-test.xspec b/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/metamap-test.xspec new file mode 100644 index 00000000..4a617357 --- /dev/null +++ b/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-mapping-xspec/metamap-test.xspec @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-runtime-xspec/jsonschema-gen-test.xspec b/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-runtime-xspec/jsonschema-gen-test.xspec new file mode 100644 index 00000000..11eab3a4 --- /dev/null +++ b/src/schema-gen/JSON-schema/testing/tests/jsonschemagen-runtime-xspec/jsonschema-gen-test.xspec @@ -0,0 +1,49 @@ + + + + + + + + + + + + + On + + + + + + ... + + + + + + + + diff --git a/src/schema-gen/METASCHEMA-ALL-VALIDATORS.xpl b/src/schema-gen/METASCHEMA-ALL-VALIDATORS.xpl new file mode 100644 index 00000000..6b644191 --- /dev/null +++ b/src/schema-gen/METASCHEMA-ALL-VALIDATORS.xpl @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/schema-gen/Makefile b/src/schema-gen/Makefile index 6a23d2e1..e88e0d86 100644 --- a/src/schema-gen/Makefile +++ b/src/schema-gen/Makefile @@ -4,13 +4,24 @@ include ../testing/make_common.mk test_metaschema:=../testing/models_metaschema.xml output_folder:=test_output + .PHONY: test -test: smoke-test ## Run all tests +test: smoke-test unit-test ## Run all tests + .PHONY: smoke-test -smoke-test: ## Run all smoke-tests +smoke-test: ## Generate schemas from ../testing/models_metaschema.xml ./mvn-schemas-xpl.sh "$(test_metaschema)" $(output_folder) models_metaschema + +.PHONY: unit-test +unit-test: xsd-proof-test ## Generate, validate and test run an XSD for ../testing/models_metaschema.xml + + +.PHONY: xsd-proof-test +xsd-proof-test: ## Proof test XSD schema for ../testing/models_metaschema.xml + ./mvn-xsd-proofcheck-xpl.sh "$(test_metaschema)" + .PHONY: clean clean: ## Remove test output rm -fr $(output_folder)/* diff --git a/src/schema-gen/XSD/make-metaschema-xsd.xsl b/src/schema-gen/XSD/make-metaschema-xsd.xsl index 59b03f55..3d5998db 100644 --- a/src/schema-gen/XSD/make-metaschema-xsd.xsl +++ b/src/schema-gen/XSD/make-metaschema-xsd.xsl @@ -68,6 +68,8 @@ IntegerDatatype IPV4AddressDatatype IPV6AddressDatatype + MarkupLineDatatype + MarkupMultilineDatatype NonNegativeIntegerDatatype PositiveIntegerDatatype StringDatatype diff --git a/src/testing/Makefile b/src/testing/Makefile new file mode 100644 index 00000000..d9fca3dd --- /dev/null +++ b/src/testing/Makefile @@ -0,0 +1,61 @@ +include ./make_common.mk + +# TODO: Build out targets and runtimes for XML <-> JSON conversions +# Including XSpec testing of conversion pipelines and steps +# Extend and integrate unit tests into this Makefile + +# See the Makefile at ../schema-gen/InspectorXSLT/Makefile for more logic to borrow + +# INCLUDES: +# smoke-test - smoke testing - for this directory, pre-checks models_metaschema.xml +# xspec - run XSpec tests in designated folder +# clean - clean up designated output folder + +module_path:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +output_folder:=$(module_path)/test_output +xspec_script=$(realpath $(module_path)/../../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch-quiet.sh) +xspec_ci_script=$(realpath $(module_path)/../../../support/xslt3-functions/xspec-dev/mvn-saxon-xspec-batch.sh) +metaschema_validate_xsd_script=$(realpath $(module_path)/../validate/mvn-metaschema-xsd-validate-xpl.sh) +metaschema_validate_schematron_script=$(realpath $(module_path)/../validate/mvn-composition-validate-xpl.sh) + +folder=. +test_metaschema=models_metaschema.xml + + +.PHONY: test +test: smoke-test spec-test ## Run all tests + +# .PHONY: spec-test # +# spec-test: ## Run all specification tests +# LOGFILE="$(output_folder)/inspector-functional-tests.log" $(xspec_ci_script) \ +# "folder=$(module_path)/testing/tests/inspector-functional-xspec" \ +# "report-to=$(output_folder)/inspector-functional-tests_report.html" \ +# "junit-to=$(output_folder)/inspector-functional-tests_junit-report.xml" \ +# "stop-on-error=yes" \ +# "recurse=yes" + + +.PHONY: smoke-test +smoke-test: pre-checks ## For this directory, run pre-checks for other processes + + +.PHONY: pre-checks +pre-checks: ## Validate and check models_metaschema.xml + $(metaschema_validate_xsd_script) models_metaschema.xml + $(metaschema_validate_schematron_script) models_metaschema.xml + + +.PHONY: xspec +xspec: ## Run all *.xspec in a designated folder, quietly - use folder=[folder] + LOGFILE="$(output_folder)/$(folder)-xspec-tests.log" $(xspec_script) \ + "baseURI=file:$(module_path)/" \ + "folder=$(folder)" \ + "report-to=$(output_folder)/inspector-$(folder)-tests_report.html" \ + "stop-on-error=no" \ + "recurse=yes" + + +.PHONY: clean +clean: ## Remove test output + rm -fr $(output_folder)/* + diff --git a/src/testing/models_metaschema.xml b/src/testing/models_metaschema.xml index 0b72c8d6..4a441e7c 100644 --- a/src/testing/models_metaschema.xml +++ b/src/testing/models_metaschema.xml @@ -45,11 +45,11 @@ assembly everything. EVERYTHING + + Deprecated + a deprecated flag. + - - Deprecated - a deprecated flag. - overloaded1 diff --git a/src/testing/readme.md b/src/testing/readme.md new file mode 100644 index 00000000..245b60ce --- /dev/null +++ b/src/testing/readme.md @@ -0,0 +1,48 @@ +# Testing Resources + +See the [TESTING](../TESTING.md) docs for info on testing. + +This directory contains misc testing resources that do not have a home elsewhere, or have not yet been moved to their proper homes. + +## Warning: taking care editing resources + +The files and utilities in this subdirectory are used as inputs in testing across the repository. When editing them, be sure that dependent operations are still running. + +Don't edit and amend these resources without performing due diligence to align processes and tests that depend on them. + +## In this directory + + +Dynamic testing of Metaschema-based data conversions, XML to JSON and back. + +- models-testdata.xml +- models_metaschema.xml +- test-json-conversions.xpl +- test-xml-conversions.xpl +- test-xml-json-roundtrip.xpl + +Don't change any of these files without keeping the schema generation testing in place as it depends on them. + +## Tinydata model + +See the [tinydata](./tinydata) folder for a fully worked example, made to a different set of design requirements than models_metaschema.xml. + +It has its own tests and build scripts. + +The 'models' metaschema aims to present all assembly, field and flag model configurations and definitions in a 'lab-only' tag set. + +Tinydata, in contrast, is designed to be actually useful for some range of use cases, for example glossaries, data sheets or spreadsheet dumps. + +## Schema generation testing overhaul planning Summer 2024 + +- [ ] **Phase I** plan out, test and code solution to Issue 105 - JSON schema `choice` fail + - [x] use tinydata example to unit test this in schema-gen/JSON-schema + - [ ] demonstrate with some go/no-go testing in tinydata that this works + - [ ] make a new OSCAL catalog JSON Schema available for field testing in oscal-xproc3 + - [ ] clean up and push to address #105 +- [ ] **Phase II** build out XSpecs for schema generation - at least minimally (foothold) + - [ ] XSD and JSON Schema in detail + - [ ] both models_metaschema and tinydata +- [ ] **Phase III** Inspector XSLT generation + - [ ] free all schema generators from `metaschema` module runtime dependency + - [ ] make all schema generation available as runtimes in XSLT, XProc 1/3 diff --git a/src/testing/tinydata/.gitignore b/src/testing/tinydata/.gitignore new file mode 100644 index 00000000..9607c7f2 --- /dev/null +++ b/src/testing/tinydata/.gitignore @@ -0,0 +1,2 @@ +# TinyData artifacts include schemas and conversion scripts to be refreshed by scripting +current/* \ No newline at end of file diff --git a/src/testing/tinydata/Makefile b/src/testing/tinydata/Makefile new file mode 100644 index 00000000..80919be3 --- /dev/null +++ b/src/testing/tinydata/Makefile @@ -0,0 +1,58 @@ +include ../../testing/make_common.mk + +module_path:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +metaschema_validate_xsd_script=$(realpath $(module_path)/../../validate/mvn-metaschema-xsd-validate-xpl.sh) +metaschema_validate_schematron_script=$(realpath $(module_path)/../../validate/mvn-composition-validate-xpl.sh) +pom_path:=../../../support/pom.xml + +# Logic for TinyData testing + +# Validate tiny_metaschema.xml + + +.PHONY: test +test: pre-checks ## Run pre-checks + +# .PHONY: smoke-test +# smoke-test: pre-checks ## For this directory, run pre-checks for other processes + + +.PHONY: pre-checks +pre-checks: ## Validate tiny_metaschema.xml against Metaschema XSD and Schematron + $(metaschema_validate_xsd_script) tiny_metaschema.xml + $(metaschema_validate_schematron_script) tiny_metaschema.xml + +.PHONY: refresh-tiny +refresh-tiny: refresh-tiny-schemas refresh-tiny-converters ## Refresh TinyData schemas and converter scripts + +.PHONY: refresh-tiny-schemas +refresh-tiny-schemas: ## Refresh XSD and JSON Schemas for TinyData, in 'current' + $(realpath $(module_path)/refresh-tiny-schemas.sh) + + +.PHONY: refresh-tiny-converters +refresh-tiny-converters: ## Refresh XML-JSON converter XSLTs for TinyData, in 'current' + $(realpath $(module_path)/refresh-tiny-converters.sh) + + +# Generate schemas (call refresh-tiny-schemas.sh) +# including Composed metaschema, XSD, JSON Schema and InspectorXSLT +# place current/* into .gitignore +# Generate converters (call refresh-tiny-converters.sh) + +.PHONY: tiny-css +tiny-css: ## Create boilerplate CSS for Tiny metaschema - also in 'current' + $(call EXEC_SAXON,-xsl:../../util/make-plain-CSS.xsl -s:tiny_metaschema.xml -o:current/tiny-boilerplate.css) + + +# Batch validation +# XSD, JSON Schema, Inspector + +# Batch conversion - tiny-xsd-validate-set.sh + +# Round trip conversion test +# Batch convert valid samples using current/*-converter.xsl +# XSpec this + +# Which of all this go under CI/CD? allocate to smoke-test, unit-test etc. + diff --git a/src/testing/tinydata/TINYDATA-MAKE-JSON.xpl b/src/testing/tinydata/TINYDATA-MAKE-JSON.xpl new file mode 100644 index 00000000..304fbfd1 --- /dev/null +++ b/src/testing/tinydata/TINYDATA-MAKE-JSON.xpl @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/testing/tinydata/TINYDATA-XSD-VALIDATE.xpl b/src/testing/tinydata/TINYDATA-XSD-VALIDATE.xpl new file mode 100644 index 00000000..927a7e1f --- /dev/null +++ b/src/testing/tinydata/TINYDATA-XSD-VALIDATE.xpl @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Checking { count(*/*) }{ if (count(*/*) eq 1) then ' document' else ' documents' } against the current tinydata XSD ... + + + + ALL GOOD - confirming expected results from XSD validation + + + + + + VALIDATION ANOMALY: a document expected to be valid is found to be INVALID + + + + VALIDATION ANOMALY: a marked document ('<?EXPECT ERROR?>') is found to be VALID + + + + CONFIRMED (invalid) + + + + CONFIRMED (valid) + + + + + + + + + + + + + + + + + { (1 to 12) ! ':::::' } + + + + + + + + + + : { . } + + + + + + + \ No newline at end of file diff --git a/src/testing/tinydata/readme.md b/src/testing/tinydata/readme.md new file mode 100644 index 00000000..8e86fa5c --- /dev/null +++ b/src/testing/tinydata/readme.md @@ -0,0 +1,62 @@ +# Tiny Data Example Metaschema + +Purpose: An illustrative metaschema for testing + +Meant to be complementary to other testing Metaschemas for example the 'Everything' or 'computer model' metaschemas. + +Aims: + +- Be lightweight, tractable and intelligible +- Be actually albeit hypothetically useful i.e. be plausible & 'realistic' - more than a toy +- Illustrate basic (but not advanced) Metaschema functionality +- Illustrate core concepts including + - Recursive assemblies + - Mixing prose with structure + - both `markup-line` and `markup-multiline` datatypes + - Key-based text expansion (**insert/@ref-id**) + - Data dumps + - Layered constraints? + +## Basic model + +TinyData provides a simple model suitable for glossaries, dictionaries and similar structured prose, supplemented with a general-purpose "grid" or data-dump model. + +It is suitable for high-level structured documentation. But also for what might be CSV, JSON, or HTML tables. Also suitable for documents with islands of structure, or structures with islands of documentation. + +Functional semantics provided for include indexing and reasonably decent formatting for reuse, as HTML and Markdown among other formats. + +But the entire markup language has no more than ten or fifteen tags (depending on how you count). + +Meanwhile we get XSD, JSON Schemas, converters and other utilities (InspectorXSLT) to play with. + +Since it is straightforward to map a [Metaschema-based](https://github.com/usnistgov/metaschema) format into another Metaschema-based format, producing OSCAL (for example) from TinyData ought to be an instructive if elementary exercise. + +## dev punchlist + +Addressing https://github.com/usnistgov/metaschema-xslt/issues/105 + +But also leaving this resource intact for later use + +- Copy scripting over from ../issue105/ +- Refresh validators: XSD, JSON Schema and InspectorXSLT + - leave XProc in place for later use +- Validate `choice` use case + - field test this against samples (good vs broken) + - demonstrate XSD, JSON Schema *and InspectorXSLT* + - XSpec JSON Schema correction in ../../src/schema-gen/JSON-schema/ +- Assess issue with datatype handling + - are markup-line and markup-multiline adequately handled + - https://github.com/usnistgov/OSCAL/issues/2007 + - also sketch this out in XSpec +- Build out solution + - using ../../src/schema-gen/JSON-schema/choice-split.xsl + +- Makefile - `run tests` should include + - XSpecs over in ../../src + - field testing JSON and XSD validations of TinyData? (maybe not) +- Utilities? + - XSLT for TinyData making HTML + - Markdown? + - CSS for editor or browser + +Further: build out TinyData examples \ No newline at end of file diff --git a/src/testing/tinydata/refresh-tiny-converters.sh b/src/testing/tinydata/refresh-tiny-converters.sh new file mode 100644 index 00000000..269fb621 --- /dev/null +++ b/src/testing/tinydata/refresh-tiny-converters.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../common/subcommand_common.bash + +source "$SCRIPT_DIR/../../common/subcommand_common.bash" + +usage() { + cat <&2 + rm -f "$XJ_CONVERTER" +fi + +if [ -e "$JX_CONVERTER" ]; then + echo "Overwriting prior $JX_CONVERTER..." >&2 + rm -f "$JX_CONVERTER" +fi + +invoke_calabash "${CALABASH_ARGS}" + +if [ -e "$XJ_CONVERTER" ] && [ -e "$JX_CONVERTER" ]; then + echo "Wrote fresh XML/JSON conversion XSLTs into ${OUTPUT_DIR}" >&2 +fi + +fi diff --git a/src/testing/tinydata/refresh-tiny-schemas.sh b/src/testing/tinydata/refresh-tiny-schemas.sh new file mode 100644 index 00000000..8bf3ab2e --- /dev/null +++ b/src/testing/tinydata/refresh-tiny-schemas.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../common/subcommand_common.bash + +source "$SCRIPT_DIR/../../common/subcommand_common.bash" + +usage() { + cat <&2 + rm -f "$COMPOSED_METASCHEMA" +fi + +if [ -e "$XSD_FILE" ]; then + echo "Overwriting prior $XSD_FILE..." >&2 + rm -f "$XSD_FILE" +fi + +if [ -e "$JSONSCHEMA_FILE" ]; then + echo "Overwriting prior $JSONSCHEMA_FILE..." >&2 + rm -f "$JSONSCHEMA_FILE" +fi + +if [ -e "$JSONSCHEMA_XMLFILE" ]; then + echo "Overwriting prior $JSONSCHEMA_XMLFILE..." >&2 + rm -f "$JSONSCHEMA_XMLFILE" +fi + +if [ -e "$INSPECTORXSLT_FILE" ]; then + echo "Overwriting prior $INSPECTORXSLT_FILE..." >&2 + rm -f "$INSPECTORXSLT_FILE" +fi + + +# echo "${CALABASH_ARGS}" + +invoke_calabash "${CALABASH_ARGS}" + +if [ -e "$XSD_FILE" ] && [ -e "$JSONSCHEMA_FILE" ] && [ -e "$INSPECTORXSLT_FILE" ]; then + echo "Wrote composed metaschema (de-referenced input) to $COMPOSED_METASCHEMA" >&2 + echo "Wrote XSD to $XSD_FILE" >&2 + echo "Wrote JSON schema to $JSONSCHEMA_FILE" >&2 + echo "Wrote JSON schema (XML notation) to $JSONSCHEMA_XMLFILE" >&2 + echo "Wrote Inspector XSLT to $INSPECTORXSLT_FILE" >&2 +fi + +fi diff --git a/src/testing/tinydata/tiny-data/bigbadtiny.xml b/src/testing/tinydata/tiny-data/bigbadtiny.xml new file mode 100644 index 00000000..71e83693 --- /dev/null +++ b/src/testing/tinydata/tiny-data/bigbadtiny.xml @@ -0,0 +1,30 @@ + + + Big Bad Tiny Data +

A tiny data example sheet.

+

Find examples of both valid and invalid markup-line and markup-multiline in a pretend operational context.

+ + Some valid data +

Here's some okay markup multiline, all clear.

+
+ + Valid structures +

Including:

+
    +
  • lists
  • +
  • tables
  • +
  • preformatted blocks
  • +
  • block quotes
  • +
+
+ + Here's a data sheet + + a + b + + + + diff --git a/src/testing/tinydata/tiny-data/terms-of-art.xml b/src/testing/tinydata/tiny-data/terms-of-art.xml new file mode 100644 index 00000000..b800543d --- /dev/null +++ b/src/testing/tinydata/tiny-data/terms-of-art.xml @@ -0,0 +1,51 @@ + + + + Terms of Art +

Some terms of art.

+

A glossary to Metaschema technology.

+

Nothing here is normative.

+ + Metaschema + metaschema +

A metaschema is a composed artifact representing an abstract information model. If you are reading this you probably already have a good idea of what a metaschema is. In encoded form, a specific metaschema will define a set of rules to be tested over data instances - actual data, however stored and expressed. Data instances (documents or data sets) can be discriminated on the basis of whether and to what extent they follow such rules, thus serving as valid instances of the complex object type (or one such object type) defined by the metaschema.

+

When a data set or document is known or knowable as valid, it becomes possible to make with confidence a large set of assertions regarding its contents, based on information known from the metaschema. Essentially it converts the problem of interpreting the document contents from an open world to a closed world problem, by defining structures and boundaries for the information space into which data can be projected and declaring as out of bounds anything that is likely to pose problems because not well defined, or defined at all.

+
+ + module + module +

A Metaschema module represents implementations of the individual information elements of the information model using definitions

. +

A module is synonym for a metaschema as defined above.

+
+ + Assembly + assembly +

An assembly is a complex object defined in a metaschema. Its properties include a name (identifier); a name in use (a tag to be used in data); and a model, including both permitted flags(appearing one each at most), assemblies, and fields (potentially appearing in multiples).

+

Assemblies have formal names (often giving more information than the tag or name-in-use) and descriptions, and they may be defined with additional constraints to apply either to themselves or descendants (structures within data content).

+

At least one assembly must be designated in a metaschema as a possible root assembly, that is to say the data object that contains all other data objects given, and thus the scope for parsing. Assemblies not defined as possible roots cannot appear at the top (meaning, themselves comprising the entire data instance), but they will commonly be permitted inside other definitions in a well-defined arrangement.

+

An assembly is like a record type whose properties can include other records - or in XML, a complexType (element with complex element content, not mixed or text content).

+
+ + Field + field +

A field, like an assembly, is a data structure. Unlike assemblies, however, fields have no models (containing further fields and assemblies), instead presenting a single atomic value of a designated type (using the field definition's as-type). Datatypes for fields (and flags) include not only strings and numbers of different types (integer etc.) but also time-and-duration types, URIs and more.

+

Like assemblies, fields can have flags, providing for an additional layer for annotation of the field value.

+
+ + Flag + flag +

Flags are simple named data points associated with individual assemblies or fields.

+

Like fields, flags have atomic values that can be assigned data types and validated for the lexical forms associated with those types.

+

An XML representation will often use attribute syntax to represent flags, as a convenience.

+
+ + Value + value +

Values are data points associated singly with fields or flags. Values can be assigned a type, in which case their lexical form must (for the data to be metaschema-valid) conform to requirements for that type.

+

Note that fields have their own values, while they can also have flags with their own values.

+

Assemblies do not have values, while a composite value can always be constructed for an assembly from the values of its contents, or by applying an appropriate function or filter.

+
+ +
diff --git a/src/testing/tinydata/tiny-data/tiny1.xml b/src/testing/tinydata/tiny-data/tiny1.xml new file mode 100644 index 00000000..5fb5c1f0 --- /dev/null +++ b/src/testing/tinydata/tiny-data/tiny1.xml @@ -0,0 +1,22 @@ + + + Hello World + + Part First + + Some part +

Some parting words.

+
+ +

Take note here.

+
+
+ + +

An endnote, with emphasis.

+
+
+
\ No newline at end of file diff --git a/src/testing/tinydata/tiny-json-validate-xp3.sh b/src/testing/tinydata/tiny-json-validate-xp3.sh new file mode 100644 index 00000000..17a5ae92 --- /dev/null +++ b/src/testing/tinydata/tiny-json-validate-xp3.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../common/subcommand_common.bash + +source "$SCRIPT_DIR/../../common/subcommand_common.bash" + +usage() { + cat < + http://json-schema.org/draft-07/schema# + http://csrc.nist.gov/ns/metaschema-xslt/tinydata/0.0.2/tiny-schema.json + Tiny Data Model: JSON Schema + object + + + Schema Directive + A JSON Schema directive to bind a specific schema to its document instance. + #/definitions/json-schema-directive + #/definitions/URIReferenceDatatype + + + Tiny Data + A minimally described data set. + #/definitions/tiny-tiny:TINY + object + + + Tiny ID + An identifier. + #/definitions/TokenDatatype + + + #/definitions/tiny-tiny:title + + + + + #/definitions/tiny-tiny:term + + + array + 1 + + #/definitions/tiny-tiny:term + + + + + + Stuff + Some amount of tiny stuff. + #/definitions/MarkupMultilineDatatype + + + + + #/definitions/tiny-tiny:part + + + array + 1 + + #/definitions/tiny-tiny:part + + + + + + + + #/definitions/tiny-tiny:note + + + array + 1 + + #/definitions/tiny-tiny:note + + + + + + + id + title + + false + + + Title + markup-line example. + #/definitions/tiny-tiny:title + #/definitions/MarkupLineDatatype + + + Term + Simple string value example. + #/definitions/tiny-tiny:term + object + + + Term identifier + A token identifying this term uniquely within the document. + #/definitions/TokenDatatype + + + #/definitions/StringDatatype + + + + STRVALUE + id + + false + + + Note + Wrapped markup-multiline example. + #/definitions/tiny-tiny:note + #/definitions/MarkupMultilineDatatype + + + Tiny part + A bit of tiny data. + #/definitions/tiny-tiny:part + object + + + #/definitions/tiny-tiny:title + + + + + #/definitions/tiny-tiny:term + + + array + 1 + + #/definitions/tiny-tiny:term + + + + + + Stuff + Some amount of tiny stuff. + #/definitions/MarkupMultilineDatatype + + + + + #/definitions/tiny-tiny:part + + + array + 1 + + #/definitions/tiny-tiny:part + + + + + + + + #/definitions/tiny-tiny:sheet + + + array + 1 + + #/definitions/tiny-tiny:sheet + + + + + + #/definitions/tiny-tiny:note + + + + title + + false + + + Tiny sheet + A list or grid of data points (items), or an entry (row or line item) in such a list or grid that contains such a list or grid. + #/definitions/tiny-tiny:sheet + object + + + + + Field key + Distinguishing a sheet or item (field) among siblings or neighbors. + #/definitions/TokenDatatype + + + Class + Class or classes. + #/definitions/StringDatatype + + + #/definitions/tiny-tiny:title + + + Stuff + Some amount of tiny stuff. + #/definitions/MarkupMultilineDatatype + + + array + 1 + + #/definitions/tiny-tiny:sheet + + + + #/definitions/tiny-tiny:note + + + false + + + + + Field key + Distinguishing a sheet or item (field) among siblings or neighbors. + #/definitions/TokenDatatype + + + Class + Class or classes. + #/definitions/StringDatatype + + + #/definitions/tiny-tiny:title + + + Stuff + Some amount of tiny stuff. + #/definitions/MarkupMultilineDatatype + + + + + #/definitions/tiny-tiny:item + + + array + 1 + + #/definitions/tiny-tiny:item + + + + + + #/definitions/tiny-tiny:note + + + false + + + + + Line item + A value, potentially marked with @key or @class. + #/definitions/tiny-tiny:item + object + + + Field key + Distinguishing a sheet or item (field) among siblings or neighbors. + #/definitions/TokenDatatype + + + Class + Class or classes. + #/definitions/StringDatatype + + + N (position) + An indexed position (distinctive among values of parent::*/*/@n). + #/definitions/NonNegativeIntegerDatatype + + + #/definitions/MarkupLineDatatype + + + + RICHTEXT + + false + + + A whole number value. + integer + + + A single line of Markdown content conformant to the Commonmark specification. + string + ^[^ +]+$ + + + A multiple lines of Markdown content conformant to the Commonmark specification. + string + + + An integer value that is equal to or greater than 0. + + + #/definitions/IntegerDatatype + + + number + 0 + + + + + A non-empty string with leading and trailing whitespace disallowed. Whitespace is: U+9, U+10, U+32 or [ + ]+ + string + ^\S(.*\S)?$ + + + A non-colonized name as defined by XML Schema Part 2: Datatypes Second Edition. https://www.w3.org/TR/xmlschema11-2/#NCName. + string + ^(\p{L}|_)(\p{L}|\p{N}|[.\-_])*$ + + + A URI Reference, either a URI or a relative-reference, formatted according to section 4.1 of RFC3986. + string + uri-reference + + + + + #/definitions/json-schema-directive + + + #/definitions/tiny-tiny:TINY + + + + TINY + + false + diff --git a/src/testing/tinydata/tiny_metaschema.xml b/src/testing/tinydata/tiny_metaschema.xml new file mode 100644 index 00000000..3d2420b4 --- /dev/null +++ b/src/testing/tinydata/tiny_metaschema.xml @@ -0,0 +1,163 @@ + + + Tiny Data Model + 0.0.2 + tiny + http://csrc.nist.gov/ns/metaschema-xslt/tinydata + http://csrc.nist.gov/ns/metaschema-xslt/tinydata + + + + +

Tiny Metaschema

+

A metaschema can be small and yet deep.

+
+ + + Tiny Data + A minimally described data set. + TINY + + Tiny ID + An identifier. + + + + + + + + Stuff + Some amount of tiny stuff. + + + + + + + + + + + + Title + markup-line example. + + + + Term + Simple string value example. + term + + Term identifier + A token identifying this term uniquely within the document. + + +

For a more extensive model supporting definitions, acronyms etc. build this out into an assembly. + As a field, this supports some control over the vocabulary and formatting without heavier embedded metadata.

+

Of course you could always make a structured glossary out of regular and controlled parts for your terminology, and use this inside it, potentially with title/insert.

+
+
+ + + Note + Wrapped markup-multiline example. + + + + Tiny part + A bit of tiny data. + + + + + + + Stuff + Some amount of tiny stuff. + + + + + + + + + + + + + Tiny sheet + A list or grid of data points (items), or an entry (row or line item) in such a list or grid that contains such a list or grid. + + + + + + + + Stuff + Some amount of tiny stuff. + + + + entry + + + + + item + + + + + + + + + Line item + A value, potentially marked with @key or @class. + item + + + + N (position) + An indexed position (distinctive among values of parent::*/*/@n). + + + + Distinctive 'n' value + @n must be distinctive among sibling items. + +

A whole number is expected here although '0' is permitted. Values among siblings are not constrained to be ordered, only different. Ordering is up to the receiving application.

+
+
+
+

An application may constrain the value of the node to a datatype or other requirement, on the basis of @key, @class or other association(s).

+
+ + + Field key + Distinguishing a sheet or item (field) among siblings or neighbors. + + + + Class + Class or classes. + + +
diff --git a/src/testing/tinydata/tinydata-samples.xpl b/src/testing/tinydata/tinydata-samples.xpl new file mode 100644 index 00000000..2413d4e7 --- /dev/null +++ b/src/testing/tinydata/tinydata-samples.xpl @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/testing/tinydata/tinydata_xml-converter.xsl b/src/testing/tinydata/tinydata_xml-converter.xsl new file mode 100644 index 00000000..8ae7ca90 --- /dev/null +++ b/src/testing/tinydata/tinydata_xml-converter.xsl @@ -0,0 +1,17 @@ + + + + + + + yes + + + + + + + diff --git a/src/testing/tinydata/validate-tiny-json.xp3 b/src/testing/tinydata/validate-tiny-json.xp3 new file mode 100644 index 00000000..ebc0c7e4 --- /dev/null +++ b/src/testing/tinydata/validate-tiny-json.xp3 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/util/make-plain-CSS.xsl b/src/util/make-plain-CSS.xsl index 7c33cbc1..f1ee96df 100644 --- a/src/util/make-plain-CSS.xsl +++ b/src/util/make-plain-CSS.xsl @@ -30,7 +30,7 @@ diff --git a/src/validate/METASCHEMA-SCHXSLT-VALIDATE.xpl b/src/validate/METASCHEMA-SCHXSLT-VALIDATE.xpl index 53ce2154..474d2ea8 100644 --- a/src/validate/METASCHEMA-SCHXSLT-VALIDATE.xpl +++ b/src/validate/METASCHEMA-SCHXSLT-VALIDATE.xpl @@ -3,9 +3,7 @@ xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0" xmlns:metaschema="http://csrc.nist.gov/ns/metaschema/1.0" xmlns:schxslt="https://doi.org/10.5281/zenodo.1495494" - type="metaschema:METASCHEMA-ALL-SCHEMAS" name="METASCHEMA-ALL-SCHEMAS"> - - + type="metaschema:METASCHEMA-SCHXSLT-VALIDATE" name="METASCHEMA-SCHXSLT-VALIDATE"> @@ -28,6 +26,8 @@ + + diff --git a/src/validate/METASCHEMA-VALIDATE.xpl b/src/validate/METASCHEMA-VALIDATE.xpl deleted file mode 100644 index c0668bb2..00000000 --- a/src/validate/METASCHEMA-VALIDATE.xpl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/validate/METASCHEMA-XSD-VALIDATE.xpl b/src/validate/METASCHEMA-XSD-VALIDATE.xpl new file mode 100644 index 00000000..cb3f6a47 --- /dev/null +++ b/src/validate/METASCHEMA-XSD-VALIDATE.xpl @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SUCCESS - XSD Validation has apparently run without error on document { $base } + + + + + + + + + \ No newline at end of file diff --git a/src/validate/Makefile b/src/validate/Makefile index 665c7ee4..683f1d8f 100644 --- a/src/validate/Makefile +++ b/src/validate/Makefile @@ -1,11 +1,22 @@ include ../testing/make_common.mk +# Note that Makefile definitions in other subdirectories use scripts defined in this one + + # XML Calabash prefers absolute paths test_metaschema:=../testing/models_metaschema.xml .PHONY: test -test: smoke-test ## Run all tests +test: pre-checks smoke-test ## Run all tests + +# As a pre-check we validate the test metaschema first; +# if this succeeds we check its composition + +.PHONY: pre-checks ## Validate test inputs (model metaschema) + ./mvn-metaschema-xsd-validate-xpl.sh "$(test_metaschema)" + ./mvn-composition-validate-xpl.sh "$(test_metaschema)" + .PHONY: smoke-test smoke-test: ## Run all smoke-tests - ./mvn-composition-validate-xpl.sh "$(test_metaschema)" + diff --git a/src/validate/mvn-metaschema-xsd-validate-xpl.sh b/src/validate/mvn-metaschema-xsd-validate-xpl.sh new file mode 100644 index 00000000..cf163d52 --- /dev/null +++ b/src/validate/mvn-metaschema-xsd-validate-xpl.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../common/subcommand_common.bash +source "$SCRIPT_DIR/../common/subcommand_common.bash" + +usage() { + cat < - You are good - well-formed, no reported errors + You are good - well-formed, with no reported Schematron messages (reports or failed assertions) diff --git a/support/download-jars.sh b/support/download-jars.sh new file mode 100644 index 00000000..1e072ad2 --- /dev/null +++ b/support/download-jars.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +# This script attempts to download MorganaXProcIII + + +mkdir -p lib + +download() { + proj=$1 + lcproj=`echo $proj | tr '[:upper:'] '[:lower:]'` + uri="https://github.com/nineml/$lcproj/releases/latest" + ver=`curl -sI $uri | grep -i location: | sed "s#^.*/tag/##" | tr -d '\n\r'` + if [ ! -f "lib/$proj-$ver.jar" ]; then + echo "Downloading $proj ..." + rm -f lib/$proj-*.jar + uri="https://github.com/nineml/$lcproj/releases/download/$ver/$lcproj-$ver.zip" + curl -s -L -o lib/$lcproj-$ver.zip $uri + cd lib + unzip -q -j $lcproj-$ver.zip "*.jar" + rm $lcproj-$ver.zip + cd .. + fi +} + +download CoffeeGrinder +download CoffeeFilter +download CoffeeSacks + +if [ ! -d lib/xmlcalabash1-coffeepress.jar ]; then + echo "Downloading CoffeePress ..." + curl -s -L -o coffeepress.zip \ + https://github.com/ndw/xmlcalabash1-coffeepress/releases/download/1.0.0/xmlcalabash1-coffeepress-1.0.0.zip + unzip -q -j coffeepress.zip "*.jar" + mv *.jar lib/ + rm -f coffeepress.zip +fi + +if [ ! -d xmlcalabash-1.5.7-120 ]; then + echo "Downloading XML Calabash ..." + curl -s -L -o xmlcalabash.zip \ + https://github.com/ndw/xmlcalabash1/releases/download/1.5.7-120/xmlcalabash-1.5.7-120.zip + unzip -q xmlcalabash.zip + rm -f xmlcalabash.zip +fi + +if [ ! -f saxon-he-12.3.jar ]; then + echo "Downloading Saxon 12.3 ..." + curl -s -L -o SaxonHE12-3J.zip https://www.saxonica.com/download/SaxonHE12-3J.zip + unzip -q -o SaxonHE12-3J.zip "*.jar" + rm -f SaxonHE12-3J.zip saxon-he-test*.jar saxon-he-xqj*.jar +fi + +if [ ! -f saxon-he-12.3.jar ]; then + echo "Downloading Saxon 12.3 ..." + curl -s -L -o SaxonHE12-3J.zip https://www.saxonica.com/download/SaxonHE12-3J.zip + unzip -q -o SaxonHE12-3J.zip "*.jar" + rm -f SaxonHE12-3J.zip saxon-he-test*.jar saxon-he-xqj*.jar +fi + + + https://sourceforge.net/projects/morganaxproc-iiise/files/MorganaXProc-IIIse-1.3.6/MorganaXProc-IIIse-1.3.6.zip/download + + + + diff --git a/support/pattern-test.xsl b/support/pattern-test.xsl new file mode 100644 index 00000000..d79ff1cd --- /dev/null +++ b/support/pattern-test.xsl @@ -0,0 +1,23 @@ + + + + + + + + + + C + g + I + + + + + + + + + + \ No newline at end of file diff --git a/support/refresh-lib.sh b/support/refresh-lib.sh new file mode 100644 index 00000000..4dc2b488 --- /dev/null +++ b/support/refresh-lib.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# This script attempts to download MorganaXProcIII + + +mkdir -p lib + +pushd lib + +morgana=MorganaXProc-IIIse-1.3.6 + +morgana_download="https://sourceforge.net/projects/morganaxproc-iiise/files/${morgana}/${morgana}.zip/download" + +if [ ! -f "${morgana}.zip" ]; then + echo "Downloading Morgana XProc III SE ..." + curl -L -o "${morgana}.zip" "${morgana_download}" + unzip -qo "${morgana}.zip" -x __MACOSX/** +fi + + +if [ ! -f MorganaXProc-IIIse-1.3.6/MorganaXProc-IIIse_lib/saxon-he-12.3.jar ]; then + echo "Downloading Saxon 12.3 ..." + curl -s -L -o SaxonHE12-3J.zip https://www.saxonica.com/download/SaxonHE12-3J.zip + unzip -q -o SaxonHE12-3J.zip "*.jar" + rm -f SaxonHE12-3J.zip saxon-he-test*.jar saxon-he-xqj*.jar lib/* + rmdir lib + mv -f saxon-he-12.3.jar MorganaXProc-IIIse-1.3.6/MorganaXProc-IIIse_lib + +fi + +# C:\Users\wap1\Documents\usnistgov\metaschema-xslt\support\lib\MorganaXProc-IIIse-1.3.6\MorganaXProc-IIIse_lib + +popd + diff --git a/support/schxslt b/support/schxslt index 87cf981d..3f961be6 160000 --- a/support/schxslt +++ b/support/schxslt @@ -1 +1 @@ -Subproject commit 87cf981dcefd80247d2203fbdf63f5f15f212e1d +Subproject commit 3f961be6b1e7b1bd6522b39002d1c082bc841071 diff --git a/support/xslt3-functions b/support/xslt3-functions new file mode 160000 index 00000000..c528c506 --- /dev/null +++ b/support/xslt3-functions @@ -0,0 +1 @@ +Subproject commit c528c506a4ee3f87cd508795b3965def9bd49815 diff --git a/support/xspec b/support/xspec deleted file mode 160000 index 9cef3713..00000000 --- a/support/xspec +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9cef3713f5a7aaedf38a4ec2190ba3262d51cd72 diff --git a/support/xspec-dev/XSPEC-BATCH.xsl b/support/xspec-dev/XSPEC-BATCH.xsl deleted file mode 100644 index 98ed7016..00000000 --- a/support/xspec-dev/XSPEC-BATCH.xsl +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - - - - ../xspec/src/reporter/junit-report.xsl - - - - - - - - - - - src - - *.xspec - - no - - - - - - - - - - no - - - no - - - - - - select={$pattern} - recurse={ if ($recurse=('no','false')) then 'no' else 'yes' } - on-error={ if ($stopping-on-error) then 'fail' else 'warning' } - - - - - - - - - - ERROR: Unable to resolve collection at URI {$collection-uri} - getting {$err:code} '{$err:description}' - - - - - - Param $baseURI is: { $baseURI } - Static base URI is: { static-base-uri() } - Collection location is: { $collection-location } - - - - - - Acquiring collection from { $collection-uri } - - - - - - - - ERROR: Unable to compile XSpec at { $my?name } - getting {$err:code} '{$err:description}' - - - - - - - - - - ERROR: - Unable to execute compiled XSpec from { /*/xsl:variable[@name='Q{{http://www.jenitennison.com/xslt/xspec}}xspec-uri'] } - getting {$err:code} - '{$err:description}' - - - - - - - - - - - - - - - - - - - - - - - WARNING: of { count($collection-in) } { if (count($collection-in)=1) then 'file' else 'files' }, { count($dropped) } { if (count($dropped) = 1) then 'file selected was' else 'were' } dropped - either unavailable, would not compile (XSpec to XSLT), or would not execute (XSLT): - { $dropped?name => string-join(', ') } - - - - - - - Failures detected - process terminating - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WARNING: No JUnit report is written to '{ $junit-to }' - try a file name with suffix - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {$report-to}/{$xspec-basename}.html - - - - - - - - - - - - - - Writing report {$filename} ... - - - - - - - - - Writing report {$filename} ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/XSPEC-SINGLE.xsl b/support/xspec-dev/XSPEC-SINGLE.xsl deleted file mode 100644 index 5599a8ee..00000000 --- a/support/xspec-dev/XSPEC-SINGLE.xsl +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - ../xspec/src/compiler/compile-xslt-tests.xsl - - - - - - - - - - - - - - - ... and formatted a report. - - - - - - - - - - - - - - - - - - - - - - - - - - ... compiled XSpec ... - - - - - - - - - - - - - - - - - - - - ... executed XSpec ... - - - \ No newline at end of file diff --git a/support/xspec-dev/mvn-saxon-xspec-batch-quiet.sh b/support/xspec-dev/mvn-saxon-xspec-batch-quiet.sh deleted file mode 100644 index 9c64eb4e..00000000 --- a/support/xspec-dev/mvn-saxon-xspec-batch-quiet.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# shellcheck source=../common/subcommand_common.bash - -source "$SCRIPT_DIR/../../src/common/subcommand_common.bash" - -XSLT_FILE="${SCRIPT_DIR}/XSPEC-BATCH.xsl" -LOGFILE=${LOGFILE:-"xspec_$(date +"%Y%m%d%H%M").log.txt"} - -usage() { - cat </dev/null to drop all runtime messages / progress reports instead of logging -# the process should error out only if stop-on-error=yes, otherwise it will do its best to complete -# invoke_saxon "${SAXON_ARGS}" 2>${LOGFILE} | echo_on_error "Failure running XSpec: see ${LOGFILE}" | tee ${LOGFILE} -invoke_saxon "${SAXON_ARGS}" 2>${LOGFILE} | tee ${LOGFILE} diff --git a/support/xspec-dev/mvn-saxon-xspec-batch.sh b/support/xspec-dev/mvn-saxon-xspec-batch.sh deleted file mode 100755 index 16c34ae0..00000000 --- a/support/xspec-dev/mvn-saxon-xspec-batch.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# shellcheck source=../common/subcommand_common.bash - -source "$SCRIPT_DIR/../../src/common/subcommand_common.bash" - -XSLT_FILE="${SCRIPT_DIR}/XSPEC-BATCH.xsl" -LOGFILE=${LOGFILE:-"xspec_$(date +"%Y%m%d%H%M").log.txt"} - -usage() { - cat </dev/null to drop all runtime messages / progress reports instead of logging -# the process should error out only if stop-on-error=yes, otherwise it will do its best to complete -invoke_saxon "${SAXON_ARGS}" 2>&1 | tee ${LOGFILE} diff --git a/support/xspec-dev/mvn-saxon-xspec-html.sh b/support/xspec-dev/mvn-saxon-xspec-html.sh deleted file mode 100755 index 8aae060a..00000000 --- a/support/xspec-dev/mvn-saxon-xspec-html.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# shellcheck source=../common/subcommand_common.bash - -source "$SCRIPT_DIR/../../src/common/subcommand_common.bash" - -XSLT_FILE="${SCRIPT_DIR}/XSPEC-SINGLE.xsl" - -usage() { - cat </dev/null` in the command invoking the script. - -``` -./mvn-saxon-xspec-batch.sh folder=src/project recurse=yes 2>/dev/null -``` - -All XSpec files in the folder `src/project` and any subfolders, reporting results to the console (STDOUT) but not creating HTML reports and not echoing warning or error messages to the console. - -It is best to silence STDERR only after you are confident that all XSpecs in your file set can be run successfully, especially if the "break early on error" option is set (since you will neither see STDERR nor get any results). - -## Enhanced HTML Production - -In order to work around limitations in the current XSpec HTML production (details with respect to its deployment under XProc 1.0), a [new HTML production XSLT](xspec-mx-html-report.xsl) is provided here, for use either for standalone XSpec reporting, or for reporting results from several XSpecs in aggregate ("batch"). - -[This XSLT ](xspec-mx-html-report.xsl) produces standalone HTML including embedded CSS and some lightweight Javascript supporting navigation features. - -### Theming HTML from XProc - -The XProc files support a runtime option, `theme`, which also exposes control of the theme setting (in the HTML and CSS). This takes the form of an HTML `class` value on the `body` element, along with CSS to be applied to the page on the basis of that setting. - -- `theme=clean` (the default) produces a medium-contrast color-neutral format -- `theme=uswds` uses colors for emphasis from the USWDS color scheme -- `theme=classic` uses colors drawn from the good-old XSpec HTML -- `theme=toybox` provides a more extravagant scheme. - -New themes can be added in the XSLT or in a new "shell" XSLT importing it, by copying and modifying an appropriate template to match the new theme and give it style. Such an importing XSLT can also modify any other feature of the HTML page result. - diff --git a/support/xspec-dev/testing.md b/support/xspec-dev/testing.md deleted file mode 100644 index 6bec6661..00000000 --- a/support/xspec-dev/testing.md +++ /dev/null @@ -1,28 +0,0 @@ -# Testing - -This work in support of XSpec is in need of more rigorous testing. - -Interactive testing has been performed with all scripts. - -But requirements and specifications are loose, having been driven up to this point by functional requirements faced by the metaschema-xslt project - for a flexible, performant runtime that works independently of licensed software, with developer-friendly controls from the command line and inside CI/CD. Specifically, this means a number of issues, including testing, that bear on full integration back into XSpec have been set aside for the present. - -Some experience in application will also be helpful in prioritizing the testing work to be done. - -Meanwhile, some interesting questions, both practical and theoretical, are posed by the need to test these capabilities, especially outside particular deployments. - -For which capabilities can we write XSpec or meaningfully test and confirm (expose and document) in other ways, including - - - `xsl:message` behavior including terminate="yes" - - side effects such as `xsl:result-document`? - - Runtime parameter semantics - - Exception handling - -(XSpec especially with `@run-as='external'` is able to provide support for much of this, but specific means are tbd.) - -Contributor at-galtm also notes that message handling code in the [xslt3-functions project repository](https://github.com/usnistgov/xslt3-functions) is configurable to emit processing instructions (instead of or with `xsl:message`) as message proxies, making this functionality testable. - -Additionally, plenty of 'obvious' tasks remain to be done, including - - - Addressing functional gaps e.g. Schematron, `x:label`, `x:pending` - - Scope/coverage analysis - - XSpec for "easy" stuff, including HTML rendering diff --git a/support/xspec-dev/testing/copy_me.xsl b/support/xspec-dev/testing/copy_me.xsl deleted file mode 100644 index 6e34968e..00000000 --- a/support/xspec-dev/testing/copy_me.xsl +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/support/xspec-dev/testing/iso8601.ixml b/support/xspec-dev/testing/iso8601.ixml deleted file mode 100644 index 9a4b6933..00000000 --- a/support/xspec-dev/testing/iso8601.ixml +++ /dev/null @@ -1,171 +0,0 @@ -{ An Invisible XML grammar for ISO 8601(:2004?) dates and times. } -{ Originally constructed by Norm Tovey-Walsh, 17 April 2022 } -{ See https://en.wikipedia.org/wiki/ISO_8601 among others } - --iso8601-datetime = date - ; time - ; datetime - ; duration - ; interval - ; recurrence . - -date = calendar-date ; ordinal-date ; week-date . - --time = local-time ; utc-time . - --datetime = local-datetime ; utc-datetime . - -local-datetime = -date, -'T', -local-time-no-t . -utc-datetime = -date, -'T', -utc-time-no-t . - -duration = -standard-duration; -alternate-duration . - -interval = start-end-interval - ; start-plus-duration-interval - ; duration-plus-end-interval . - -recurrence = repeat-count, -'/', interval . - -{ -- Calendar dates -- } - --calendar-date = complete-calendar-date - ; reduced-accuracy-calendar-date - ; expanded-calendar-date . - --complete-calendar-date = year, month, day; year, -'-', month, -'-', day . - --reduced-accuracy-calendar-date = year, -'-', month; year; century . - --expanded-calendar-date = expanded-year, month, day - ; expanded-year, -'-', month, -'-', day - ; expanded-year, -'-', month - ; expanded-year - ; expanded-century . - -{ -- Ordinal dates -- } - --ordinal-date = complete-ordinal-date ; expanded-ordinal-date . - --complete-ordinal-date = year, day-of-year - ; year, -'-', day-of-year . - --expanded-ordinal-date = expanded-year, day-of-year - ; expanded-year, -'-', day-of-year . - -{ -- Week dates -- } - --week-date = complete-week-date - ; reduced-accuracy-week-date - ; expanded-week-date . - --complete-week-date = year, -'W', week, day-of-week - ; year, -'-W', week, -'-', day-of-week . - --reduced-accuracy-week-date = year, -'W', week - ; year, -'-W', week . - --expanded-week-date = expanded-year, -'W', week, day-of-week - ; expanded-year, -'-W', week, '-', day-of-week - ; expanded-year, -'W', week - ; expanded-year, -'-W', week . - -{ -- Local time -- } - -local-time = local-time-t ; local-time-no-t . - --local-time-t = local-time-without-utc-t; local-time-with-utc-t . --local-time-no-t = local-time-without-utc; local-time-with-utc . - --local-time-without-utc-t = -'T', local-time-without-utc . - --local-time-without-utc = hour, minute, second - ; hour, -':', minute, -':', second - ; hour, minute - ; hour, -':', minute - ; hour - ; fractional-second-local-time - ; fractional-minute-local-time - ; fractional-hour-local-time . - --local-time-with-utc-t = -local-time-without-utc-t, utc-offset . --local-time-with-utc = -local-time-without-utc, utc-offset . - --fractional-second-local-time = (hour, minute, second; hour, -':', minute, -':', second), - fraction-sep, - fractional-second . - --fractional-minute-local-time = (hour, minute; hour, -':', minute), - fraction-sep, - fractional-minute . - --fractional-hour-local-time = hour, fraction-sep, fractional-hour . - -utc-offset = offset-hour, (-':'?, offset-minute)? . - -{ -- UTC time -- } - -utc-time = utc-time-t ; utc-time-no-t . --utc-time-t = -local-time-without-utc-t, -'Z' . --utc-time-no-t = -local-time-without-utc, -'Z' . - -{ -- Durations -- } - --standard-duration = -'P', (standard-ymdhs-duration ; standard-week-duration) . - -{ N.B. This tecnically allows a standard-ymdhs-duration with no fields. } --standard-ymdhs-duration = duration-years?, duration-months?, duration-days?, - (-'T', duration-hours?, duration-minutes?, duration-seconds?)? . --standard-week-duration = duration-weeks . - --alternate-duration = -'P', (alternate-ymd-duration ; alternate-yd-duration) . - --alternate-ymd-duration = year, month, day, -'T', hour, minute, second - ; year, -'-', month, -'-', day, -'T', hour, -':', minute, -':', second . --alternate-yd-duration = year, number-of-days, -'T', hour, minute, second - ; year, -'-', number-of-days, -'T', hour, -':', minute, -':', second . - --start-end-interval = (date; datetime), -'/', (date; datetime) . --start-plus-duration-interval = (date; datetime), -'/', duration . --duration-plus-end-interval = duration, -'/', (date; datetime) . - -duration-years = digit+, -'Y' . -duration-months = digit+, -'M' . -duration-days = digit+, -'D' . -duration-hours = digit+, -'H' . -duration-minutes = digit+, -'M' . -duration-seconds = digit+, -'S' . -duration-weeks = digit+, -'W' . - -{ -- Recurrence -- } - --repeat-count = -'R-1' ; -'R' ; -'R', repetitions . -repetitions = digit+ . - -{ -- Utility rules -- } - -expanded-year = sign, digit+, digit, digit, digit . -expanded-century = sign, digit+, digit, digit . --sign = -'+' ; '-' . - -offset-hour = @direction, digit, digit . -offset-minute = digit, digit . -direction = '+'; '-' . - -year = digit, digit, digit, digit . -century = digit, digit . -month = digit, digit . -week = digit, digit . -day = digit, digit . -hour = digit, digit . -minute = digit, digit . -second = digit, digit . -fractional-second = digit+ . -fractional-minute = digit+ . -fractional-hour = digit+ . - -day-of-year = digit, digit, digit . -number-of-days = -day-of-year . -day-of-week = digit . - --digit = ["0"-"9"] . --fraction-sep = -[','; '.'] . diff --git a/support/xspec-dev/testing/ixml-demo.xsl b/support/xspec-dev/testing/ixml-demo.xsl deleted file mode 100644 index da0232d5..00000000 --- a/support/xspec-dev/testing/ixml-demo.xsl +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - iso8601.ixml - - - - - 1962-06-28 - 1963-11-04 - 2024-02-30 - 2024-02-99 - 2024-01-17T17:26:38.416457100-05:00 - 2024-02-300 - 2025-12-25 - 2025-12-31T - - - - - - - - - - - - - - - - - - - - BUST on '{ $maybeDateTime }' - - - - - - diff --git a/support/xspec-dev/testing/ixml-parsing.xspec b/support/xspec-dev/testing/ixml-parsing.xspec deleted file mode 100644 index 6fdc1345..00000000 --- a/support/xspec-dev/testing/ixml-parsing.xspec +++ /dev/null @@ -1,92 +0,0 @@ - - - - - Parsing some dates - - - - 2024-01-20 - - - - - 2024 - 01 - 20 - - - - - - - 2024-01-0 - - - - BUST on '2024-01-0' - - - - - - 2024-01-18T14:44 - - - - - 2024 - 01 - 18 - 14 - 44 - - - - - - - 2024-01-18T14:44:10 - - - - - 2024 - 01 - 18 - 14 - 44 - 10 - - - - - - - 2024-01-18T14:44:10.777578600-05:00 - - - - - 2024 - 01 - 18 - 14 - 44 - 10 - 777578600 - - 05 - 00 - - - - - - - diff --git a/support/xspec-dev/testing/mvn-xproc-xspec-test-batch.sh b/support/xspec-dev/testing/mvn-xproc-xspec-test-batch.sh deleted file mode 100644 index 2fceeba5..00000000 --- a/support/xspec-dev/testing/mvn-xproc-xspec-test-batch.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# shellcheck source=../common/subcommand_common.bash - -source "$SCRIPT_DIR/../../../src/common/subcommand_common.bash" - -XPROC_FILE="${SCRIPT_DIR}/xspec-test-batch.xpl" -REPORT_HTML="xspec-test-report.html" - -usage() { - cat < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/testing/xspec-basic.xspec b/support/xspec-dev/testing/xspec-basic.xspec deleted file mode 100644 index bdccf48c..00000000 --- a/support/xspec-dev/testing/xspec-basic.xspec +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/testing/xspec-shell.xspec b/support/xspec-dev/testing/xspec-shell.xspec deleted file mode 100644 index ba66430f..00000000 --- a/support/xspec-dev/testing/xspec-shell.xspec +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/testing/xspec-test-batch.xpl b/support/xspec-dev/testing/xspec-test-batch.xpl deleted file mode 100644 index 2b25a22f..00000000 --- a/support/xspec-dev/testing/xspec-test-batch.xpl +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/xspec-assurance.sch b/support/xspec-dev/xspec-assurance.sch deleted file mode 100644 index 42c624c2..00000000 --- a/support/xspec-dev/xspec-assurance.sch +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - No document found at - - - - \ No newline at end of file diff --git a/support/xspec-dev/xspec-batch-report.xpl b/support/xspec-dev/xspec-batch-report.xpl deleted file mode 100644 index abd9ea5d..00000000 --- a/support/xspec-dev/xspec-batch-report.xpl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/xspec-mx-html-report.xsl b/support/xspec-dev/xspec-mx-html-report.xsl deleted file mode 100644 index a817368b..00000000 --- a/support/xspec-dev/xspec-mx-html-report.xsl +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - - - - clean - - - - - - - - - - - - - - XSpec - { $result-count } { if ($result-count eq 1) then 'test' else 'tests'} in { $report-count } { if ($report-count eq 1) then 'report' else 'reports'} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • FAILING - - { ancestor-or-self::*/x:label => string-join(' - ') } -
  • -
    - - -
    -
    - -
    -

    XSpec Report - { @xspec/replace(.,'.*/','') }

    - -
    -
    - - - -
    - - XSpec Report - { @xspec/replace(.,'.*/','') } - -
    - -
    - -
    -
    - - - - - -
    - -
    -
    - -
    - - - - - - -
    - -
    -
    - - - - - - - - - - 🤞 - - - 👍 - - - 👎 - - - - -

    { local-name(..) }/{ local-name(.) }: { . }

    -
    - - - - -

    { local-name(..) }/{ local-name(.) }: { . }

    -
    - - -

    { local-name(..) }/{ local-name(.) }: { format-dateTime(xs:dateTime(.),'[MNn] [D1], [Y0001] [H01]:[m01]:[s01]') } ({.})

    -
    - - - - - -
    - - - open - - - - -
    - -
    -
    -
    - - - - - { $whose/ancestor::x:report ! ('report' || count(.|preceding-sibling::x:report || '-' )) }{ $whose/@id } - - - - - - - - - - { self::x:report/'Total tests '}{ child::x:label } -   - - - - - - - - - - - - { . } - : - - - - - - - - - { child::x:label } -   - - - { (child::x:test/@pending/('Pending ' || .),child::x:test[@successful='true']/'Passes','Fails')[1] } - - - - - Expecting { child::x:label } - - - -
    - - - -
    -
    - - -
    - - - - - -
    -
    - - -

    Expecting (testing against)

    -
    - - -

    Producing (actual result)

    -
    - - - - - - - - - -
    - -
    -
    - - -
    - -
    -
    - - - - - -

    From input

    -
    - - - -

    Expecting

    -
    - - - - - - -
    - - - -
    -
    - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - -.uswds { - background-color: #f0f0f0; - - .label { background-color: #1a4480; color: white} - .pending .label { background-color: inherit; color: black } - .passing { background-color: #d9e8f6 } - .pending { background-color: white } - .failing { background-color: #f8dfe2 } - .failing .passing { background-color: #d9e8f6 } - .pending.zero, .failing.zero { background-color: inherit } -} - - - - - - - -.classic { - h1, .h1, .label { background-color: #606; color: #6f6 } - h1 { padding: 0.2em } - .pending .label { background-color: inherit; color: black } - .passing { background-color: #cfc } - .pending { background-color: #eee } - .failing { background-color: #fcc } - .failing .passing { background-color: #cfc } - .pending.zero, .failing.zero { background-color: inherit } -} - - - - - -.toybox { - .label { background-color: black; color: white } - .failing .label { background-color: darkred } - .passing .label { background-color: darkgreen } - .pending .label { background-color: inherit; color: black } - .passing { background-color: honeydew } - .pending { background-color: cornsilk } - .failing { background-color: mistyrose } - .failing .passing { background-color: honeydew } - .pending.zero, .failing.zero { background-color: inherit } -} - - - - - No template for theme '{ $theme }' - using 'simple' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    diff --git a/support/xspec-dev/xspec-single-report.xpl b/support/xspec-dev/xspec-single-report.xpl deleted file mode 100644 index a847de3b..00000000 --- a/support/xspec-dev/xspec-single-report.xpl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/xspec-single-xspec-repo-report.xpl b/support/xspec-dev/xspec-single-xspec-repo-report.xpl deleted file mode 100644 index 402b1557..00000000 --- a/support/xspec-dev/xspec-single-xspec-repo-report.xpl +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/support/xspec-dev/xspec-summarize.xsl b/support/xspec-dev/xspec-summarize.xsl deleted file mode 100644 index 451f8d5e..00000000 --- a/support/xspec-dev/xspec-summarize.xsl +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - { @xspec } - { @stylesheet } - - - - - - { ancestor-or-self::*/child::label => string-join(' : ') } - - - - - \ No newline at end of file diff --git a/support/xspec-dev/xspec-summary-reduce.xsl b/support/xspec-dev/xspec-summary-reduce.xsl deleted file mode 100644 index fad32c0f..00000000 --- a/support/xspec-dev/xspec-summary-reduce.xsl +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - { (1 to 14) ! ' ...' } - XSpec summary report: { mx:enumerate('XSpec',count(report)) } - - { (1 to 14) ! ' ...' } - - - - - - - SUCCESS - { mx:give-report-counts(.) } - NO FAILURES REPORTED - - - - - - FAILURE - { mx:give-report-counts(.) } - { count(descendant::fail) } { mx:pluralize('failure',count(descendant::fail)) => upper-case() } REPORTED - - - - - { xspec-file ! tokenize(.,'/')[last()] } testing { xslt-file ! tokenize(.,'/')[last()] }: { mx:enumerate('test',@test-count) }, { @pending-count} pending, { mx:enumerate('failure',count(fail)) } - - - - - { mx:enumerate('report',count($r/report)) } with { mx:enumerate('test', sum($r/report/@test-count)) } ({ sum($r/report/@pending-count) } pending) - - - - - - - { $c } { mx:pluralize($nom,$c) } - - - - - - - - - - - - - { . }{ 's'[$plural] } - - - \ No newline at end of file

    A markup zoo permits all kinds of inline markup including bold, strong, italic, emphasis, code, subscript, superscript, hypertext anchors, and img alt-text for file.jpg (insertion points and images)