-
Notifications
You must be signed in to change notification settings - Fork 193
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
Ensure that all field and flag values require a non-empty value #805
Comments
Relatively lightweight ways to deal with this in the interim:
NB there are other validations one might want such as |
Attached is an XSLT (zipped for handling) that produces a breakout listing of all fields and flags, by assigned type, or "[string]" (in brackets) if a string type by default. It polls all the metaschema documents in a collection (line 9). To run, place the XSLT next to a pile of metaschema documents and apply it to itself. The XSLT could be enhanced to give more info (now it only produces plain text listing definitions in their modules). We can also use paths to find fields and flags by type -- |
To save a step: here is the result of running against the metaschemas in OSCAL/src/metaschema. |
Do this with #911. Remove DTD-based datatype definitions and provide for defense against empty strings. |
…ty values; ncname-workalike in JSON Schema - see usnistgov/OSCAL#911 usnistgov/OSCAL#805 also usnistgov#33 usnistgov#67 usnistgov#68
…ty values; ncname-workalike in JSON Schema - see usnistgov/OSCAL#911 usnistgov/OSCAL#805 also usnistgov#33 usnistgov#67 usnistgov#68
* Addressing datatype validation issues: whitespace collapsing; non-empty values; ncname-workalike in JSON Schema - see usnistgov/OSCAL#911 usnistgov/OSCAL#805 also #33 #67 #68 * Improvements to XSD production; fully aligning 'token' datatype across XSD and JSON Schema implementations.
* Adjusted metaschemas: new 'version'; json-base-uri * Added 'complete' metaschema * Changes to OSCAL metaschemas in view of enhancements addressing usnistgov#805, usnistgov#911, usnistgov#67, usnistgov#868.
* Adjusted metaschemas: new 'version'; json-base-uri * Added 'complete' metaschema * Changes to OSCAL metaschemas in view of enhancements addressing usnistgov#805, usnistgov#911, usnistgov#67, usnistgov#68
* Adjusted metaschemas: new 'version'; json-base-uri * Added 'complete' metaschema * Changes to OSCAL metaschemas in view of enhancements addressing usnistgov#805, usnistgov#911, usnistgov#67, usnistgov#68
* Adjusted metaschemas: new 'version'; json-base-uri * Added 'complete' metaschema * Changes to OSCAL metaschemas in view of enhancements addressing usnistgov#805, usnistgov#911, usnistgov#67, usnistgov#68
* Adjusted metaschemas: new 'version'; json-base-uri * Added 'complete' metaschema * Changes to OSCAL metaschemas in view of enhancements addressing usnistgov#805, usnistgov#911, usnistgov#67, usnistgov#68
* Adjusted metaschemas: new 'version'; json-base-uri * Added 'complete' metaschema * Changes to OSCAL metaschemas in view of enhancements addressing usnistgov#805, usnistgov#911, usnistgov#67, usnistgov#68
* Adjusted metaschemas: new 'version'; json-base-uri * Added 'complete' metaschema * Changes to OSCAL metaschemas in view of enhancements addressing usnistgov#805, usnistgov#911, usnistgov#67, usnistgov#68
* Rework of docs focusing on JSON docs and model pipeline * Improvements to composition toolchain * Fixed a few small bugs in the metaschema-check. Improved performance of the compose pruning using an accumulator. * Moved edge-case samples into testing directory * Made shadowing warning a warning * Initial commit of an Oxygen Metaschema framework. * Creation of new compose schematron unit tests. * Cross-linking XML and JSON syntax pages and other improvements to links * Now building XML and JSON indexes to reference pages, with links to steps * Reconfigured docs pipeline (XSLT entry points); adding new files including pipeline steps * Migrating schema generation tools to new/improved composition pipeline * Addressing usnistgov/OSCAL#902 thanks for finding this bug * Enhancements to JSON Schema definition (with better performance too) * Adding support for json-base-uri as a metaschema property * Updated JSON schema $id; factoring out common docs XSLT * Fixing IDs in JSON schema per issue usnistgov/OSCAL#933. * Addressing datatype validation issues: whitespace collapsing; non-empty values; ncname-workalike in JSON Schema - see usnistgov/OSCAL#911 usnistgov/OSCAL#805 also #33 #67 #68 * Improvements to XSD production; fully aligning 'token' datatype across XSD and JSON Schema implementations. * Updating bidirectional XML/JSON converter generators (#143) * Committing a version that handles test data correctly (so far) from rebuilt metaschema composition addressing #51 #53 #76 * Now displaying constraints in documentation at point of definition; * Docs generation revamp Reworked reference and other pages to sketch - #128 and others Co-authored-by: Wendell Piez <wendell.piez@nist.gov>
* Rework of docs focusing on JSON docs and model pipeline * Improvements to composition toolchain * Fixed a few small bugs in the metaschema-check. Improved performance of the compose pruning using an accumulator. * Moved edge-case samples into testing directory * Made shadowing warning a warning * Initial commit of an Oxygen Metaschema framework. * Creation of new compose schematron unit tests. * Cross-linking XML and JSON syntax pages and other improvements to links * Now building XML and JSON indexes to reference pages, with links to steps * Reconfigured docs pipeline (XSLT entry points); adding new files including pipeline steps * Migrating schema generation tools to new/improved composition pipeline * Addressing usnistgov/OSCAL#902 thanks for finding this bug * Enhancements to JSON Schema definition (with better performance too) * Adding support for json-base-uri as a metaschema property * Updated JSON schema $id; factoring out common docs XSLT * Fixing IDs in JSON schema per issue usnistgov/OSCAL#933. * Addressing datatype validation issues: whitespace collapsing; non-empty values; ncname-workalike in JSON Schema - see usnistgov/OSCAL#911 usnistgov/OSCAL#805 also usnistgov#33 usnistgov#67 usnistgov#68 * Improvements to XSD production; fully aligning 'token' datatype across XSD and JSON Schema implementations. * Updating bidirectional XML/JSON converter generators (#143) * Committing a version that handles test data correctly (so far) from rebuilt metaschema composition addressing usnistgov#51 usnistgov#53 usnistgov#76 * Now displaying constraints in documentation at point of definition; * Docs generation revamp Reworked reference and other pages to sketch - #128 and others Co-authored-by: Wendell Piez <wendell.piez@nist.gov>
Describe the bug
For some data types, the XML and JSON schema generated for the OSCAL models allow an empty value to specified. This occurs on XML elements and attributes and JSON properties that are derived from Metaschema fields and flags.
Who is the bug affecting?
Users of the XML and JSON schemas for the OSCAL project.
What is affected by this bug?
All generated XML and JSON schemas for the OSCAL project.
Expected behavior (i.e. solution)
Empty text should cause a schema validation error. To remove this error, the content creator should remove the outer attribute, element, or property.
If this attribute, element, or property is required then an empty value should not occur, since this doesn't satisfy the outer requirement.
Other Comments
{Add any other context about the problem here.}
The text was updated successfully, but these errors were encountered: