diff --git a/build/metaschema/json/md-converter-test.xsl b/build/metaschema/json/md-converter-test.xsl index ee0645d313..a8988fc0d9 100644 --- a/build/metaschema/json/md-converter-test.xsl +++ b/build/metaschema/json/md-converter-test.xsl @@ -24,7 +24,7 @@ - + diff --git a/build/metaschema/json/md-oscal-converter.xsl b/build/metaschema/json/md-oscal-converter.xsl index 72d6d2b8d2..0f1c97eeb8 100644 --- a/build/metaschema/json/md-oscal-converter.xsl +++ b/build/metaschema/json/md-oscal-converter.xsl @@ -331,7 +331,7 @@ - & + < " @@ -462,9 +462,7 @@

**Markdown** and even " quoted text" and **more markdown**

- -See the FedRAMP Documents page under Key Cloud Service Provider (CSP) Documents, Plan of Action & Milestones (POA&M) Template Completion Guide [https://www.fedramp.gov/documents/](https://www.fedramp.gov/documents/) - + Paragraph, \n\nand new paragraph ## My test file! has an & ampersand diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test-json-converter.xsl b/build/metaschema/unit-testing/char-handling/charstrings-test-json-converter.xsl deleted file mode 100644 index 90155608d5..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test-json-converter.xsl +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - language-{.} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ^\s*(\*|\d+\.)\s - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &amp; - &lt; - - &quot; - &apos; - &#2A; - &#60; - &#7E; - &#5E; - - - - - - - - - - - - - - - - - "" - !\[{{$noclosebracket}}\] - - \(\) - `` - - \*\*\*\*\*\* - - \*\*\*\* - \*\* - ~~ - \^\^ - - - - < - - - - > - - </ - - > - - - - - - - - - - - - - - - - - - $1 - - - param-id='$1' - - - href='$2' - - - - alt='$1' - - - - src='$2' - - - - (.*?) - - - ([^{ @not }]*?) - - { insertion } - diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test-schema.json b/build/metaschema/unit-testing/char-handling/charstrings-test-schema.json deleted file mode 100644 index f634dbd315..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test-schema.json +++ /dev/null @@ -1,44 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime-schema.json", - "$comment" : "Metaschema Unit Test: datatypes-dateTime: JSON Schema", - "type" : "object", - "definitions" : - { "examples" : - { "title" : "Examples", - "description" : "Some character strings of different sorts", - "$id" : "#/definitions/examples", - "type" : "object", - "properties" : - { "character-strings" : - { "anyOf" : - [ - { "$ref" : "#/definitions/charstring" }, - - { "type" : "array", - "items" : - { "$ref" : "#/definitions/charstring" }, - "minItems" : 2 } ] }, - "markup-lines" : - { "anyOf" : - [ - { "$ref" : "#/definitions/markupline" }, - - { "type" : "array", - "items" : - { "$ref" : "#/definitions/markupline" }, - "minItems" : 2 } ] } }, - "additionalProperties" : false }, - "charstring" : - { "title" : "Character string", - "description" : "String of characters", - "$id" : "#/definitions/charstring", - "type" : "string" }, - "markupline" : - { "title" : "Markup line", - "description" : "Characters, and more", - "$id" : "#/definitions/markupline", - "type" : "string" } }, - "properties" : - { "examples" : - { "$ref" : "#/definitions/examples" } } } \ No newline at end of file diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test-schema.xsd b/build/metaschema/unit-testing/char-handling/charstrings-test-schema.xsd deleted file mode 100644 index 49e95bc931..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test-schema.xsd +++ /dev/null @@ -1,285 +0,0 @@ - - - - - Metaschema Unit Test: datatypes-dateTime - 1.0-milestone1 - metaschema-datatypes-dateTime - examples - - - - - - Examples - Some character strings of different sorts - - - Examples: Some character strings of different sorts - - - - - - - - - - - - Character string - String of characters - - - Character string: String of characters - - - - - - - Markup line - Characters, and more - - - Markup line: Characters, and more - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test-xml-converter.xsl b/build/metaschema/unit-testing/char-handling/charstrings-test-xml-converter.xsl deleted file mode 100644 index 950ad1dbdd..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test-xml-converter.xsl +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - no - - no - - - - - - { $json-indent='yes' } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - ## - ### - #### - ##### - ###### - - - - - - - - - - - | - --- | - - - - - | - - - | - - - - ``` - - - - ``` - - - - - - - - - - - - - - - * - - - - - - - - - - 1. - - - - - ` - - ` - - - * - - * - - - ** - - ** - - - " - - " - - - {{ - - }} - - - - [ - - ] - ( - - ) - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test_metaschema.xml b/build/metaschema/unit-testing/char-handling/charstrings-test_metaschema.xml deleted file mode 100644 index 71c63bf407..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test_metaschema.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - Metaschema Unit Test: datatypes-dateTime - 1.0-milestone1 - metaschema-datatypes-dateTime - http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime - - - Examples - Some character strings of different sorts - - - - - - - - - - - - Character string - String of characters - - - - Markup line - Characters, and more - - - - diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS-back.xml b/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS-back.xml deleted file mode 100644 index 99c71f4b7c..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS-back.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - Here's a string including punctuation ' " \ . $ - Here's a string with an ampersand & - Less-than and greater-than, as <delimiters> ... - The star aka asterisk * may be magical and maybe also the tick ` - Also, occasionally we have links and other markup. - diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS.json b/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS.json deleted file mode 100644 index 23a0a98cb0..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS.json +++ /dev/null @@ -1,8 +0,0 @@ - - { "examples" : - { "character-strings" : - [ "Here's a string including punctuation ' \" \\ . $", - "Here's a string with an ampersand &", - "Less-than and greater-than, as ...", - "The star aka asterisk * may be magical and maybe also the tick `" ], - "markup-lines" : "Also, occasionally we have [links](w3.org) and *other markup*." } } \ No newline at end of file diff --git a/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS.xml b/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS.xml deleted file mode 100644 index 9a8f9beb3e..0000000000 --- a/build/metaschema/unit-testing/char-handling/charstrings-test_okay-PASS.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Here's a string including punctuation ' " \ . $ - Here's a string with an ampersand & - Less-than and greater-than, as <delimiters> ... - The star aka asterisk * may be magical and maybe also the tick ` - Also, occasionally we have links and other markup. - \ No newline at end of file diff --git a/build/metaschema/unit-testing/char-handling/refresh.sh b/build/metaschema/unit-testing/char-handling/refresh.sh deleted file mode 100644 index ab6c8adba4..0000000000 --- a/build/metaschema/unit-testing/char-handling/refresh.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -# Produces Metaschema artifacts from an OSCAL Metaschema metaschema -# Including XML and JSON schemas, conversion utilities (XSLTs) and Markdown documentation - -METASCHEMAXML=charstrings-test_metaschema.xml -BASENAME=charstrings-test - -OSCALDIR=../../../.. - -if [[ -z SAXON_HOME ]]; then - echo "SAXON_HOME is not set" - exit 1 -elif [[ -z "$SAXON_HOME" ]]; then - echo "SAXON_HOME is set to the empty string" - exit 1 -fi - -SAXON=$SAXON_HOME/Saxon-HE-9.9.1-3.jar - -if [ ! -f $SAXON ]; then - echo "The saxon library was not found at: $SAXON!" - exit 1 -fi - -# Saxon CL documented here: http://www.saxonica.com/documentation9.8/using-xsl/commandline.html - -LIBDIR=$OSCALDIR/build/metaschema -XSDDIR=. -JSONDIR=. -CONVERSION_DIR=. -CURRENT_DIR=$(pwd -W) -# DOCSDIR=docs - -echo Working in $CURRENT_DIR - -MAKE_XSD="java -jar $SAXON -s:$METASCHEMAXML -o:$XSDDIR/$BASENAME-schema.xsd -xsl:$LIBDIR/xml/produce-xsd.xsl" -MAKE_JSC="java -jar $SAXON -s:$METASCHEMAXML -o:$JSONDIR/$BASENAME-schema.json -xsl:$LIBDIR/json/produce-json-schema.xsl" - -CONV_XML="java -jar $SAXON -s:$METASCHEMAXML -o:$CONVERSION_DIR/$BASENAME-xml-converter.xsl -xsl:$LIBDIR/xml/produce-xml-converter.xsl" -CONV_JSON="java -jar $SAXON -s:$METASCHEMAXML -o:$CONVERSION_DIR/$BASENAME-json-converter.xsl -xsl:$LIBDIR/json/produce-json-converter.xsl" - -EXAMPLE_BASE=charstrings-test_okay-PASS - -EXAMPLE_JSON="java -jar $SAXON -s:$EXAMPLE_BASE.xml -o:$EXAMPLE_BASE.json -xsl:$CONVERSION_DIR/$BASENAME-xml-converter.xsl json-indent=yes" -EXAMPLE_BACK="java -jar $SAXON -it -o:$EXAMPLE_BASE-back.xml -xsl:$CONVERSION_DIR/$BASENAME-json-converter.xsl json-file=$CURRENT_DIR/$EXAMPLE_BASE.json" - -# DOCS_XSLT="java -jar $SAXON -s:$METASCHEMAXML -o:$LIBDIR/temp/$BASENAME-xml-docs-md.xsl -xsl:$LIBDIR/xml/produce-and-run-documentor.xsl" - -# Now ... -echo -echo Producing JSON and XML schemas and tools from $METASCHEMAXML ... -$MAKE_XSD -echo _ Made XSD ________________________ $XSDDIR/$BASENAME-schema.xsd -$MAKE_JSC -echo _ Made JSON Schema ________________ $JSONDIR/$BASENAME-schema.json -$CONV_XML -echo _ Made XML-to-JSON converter ______ $CONVERSION_DIR/$BASENAME-xml-converter.xsl -$CONV_JSON -echo _ Made JSON-to-XML converter ______ $CONVERSION_DIR/$BASENAME-json-converter.xsl -$EXAMPLE_JSON -echo _ Produced $EXAMPLE_BASE.json from $EXAMPLE_BASE.xml -$EXAMPLE_BACK -echo _ Produced $EXAMPLE_BASE-back.xml from $EXAMPLE_BASE.json - -# $DOCS_XSLT -# echo _ Made Metaschema documentation _ $DOCSDIR/${BASENAME}_xml.md $DOCSDIR/json_${BASENAME}_json.md -# echo diff --git a/build/metaschema/xml/produce-xml-converter.xsl b/build/metaschema/xml/produce-xml-converter.xsl index 206c1f3b3d..b414af680a 100644 --- a/build/metaschema/xml/produce-xml-converter.xsl +++ b/build/metaschema/xml/produce-xml-converter.xsl @@ -44,38 +44,12 @@ xpath-default-namespace="{ $target-namespace }" exclude-result-prefixes="#all"> - + METASCHEMA conversion stylesheet supports XML->JSON conversion 88888888888888888888888888888888888888888888888888888888888888 - - - - - - no - Pass $diagnostic as 'rough' for first pass, 'rectified' for second pass - no - - - - - - - - - - - - { $json-indent='yes' } - - - 88888888888888888888888888888888888888888888888888888888888888 @@ -95,6 +69,63 @@ with fields or assemblies. --> + + + + + + + + + + + + + + + @@ -337,6 +368,21 @@ + + + + + + no + Pass $diagnostic as 'rough' for first pass, 'rectified' for second pass + no + + + + { $json-indent='yes' } + + + @@ -584,7 +630,13 @@ ) - + + + + + + + \ No newline at end of file