-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing and repairs including JSON Schema generation enhancements #119
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a0816ac
produce-xml-converter.xsl: XSpec tests and minor XSLT improvements (#87)
galtm 24e5007
JSON Schema generation improvements (#108)
wendellpiez 74f3a11
June 2024 Integration (#118)
wendellpiez 52c9f6d
June 2024 in-progress merge (#120)
wendellpiez 4e31191
More testing (#122)
wendellpiez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,7 @@ | |
|
||
# test outputs | ||
src/**/test_output/ | ||
|
||
# downloaded miscellaneous | ||
|
||
support/lib/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:mx="http://csrc.nist.gov/ns/csd/metaschema-xslt" | ||
xmlns:math="http://www.w3.org/2005/xpath-functions/math" | ||
xmlns:fn="http://www.w3.org/2005/xpath-functions" | ||
exclude-result-prefixes="xs math mx" | ||
xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0" | ||
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/metaschema/1.0" | ||
version="3.0"> | ||
|
||
|
||
<!-- This XSLT relies on a global strip-space to strip whitespace-only nodes from | ||
everything except the Markdown elements --> | ||
<xsl:strip-space elements="*"/> | ||
|
||
<xsl:preserve-space elements="p h1 h2 h3 h4 h5 h6 pre li td | ||
a insert code em i b strong sub sup fn:string"/> | ||
|
||
<xsl:mode name="mx:stripping" on-no-match="shallow-copy"/> | ||
|
||
<xsl:function name="mx:scrub-up" as="element()"> | ||
<xsl:param name="in" as="node()"/> | ||
<xsl:apply-templates mode="mx:stripping" select="$in"/> | ||
</xsl:function> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: thanks for cleaning these things up, I appreciate it.