Skip to content

Commit

Permalink
imported-from relations for usnistgov#1023.
Browse files Browse the repository at this point in the history
Co-authored-by: David Waltermire <[email protected]>
Signed-off-by: Alexander Stein <[email protected]>
  • Loading branch information
aj-stein-nist and david-waltermire committed Aug 25, 2022
1 parent 6489d47 commit eeb54c1
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README_validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For OSCAL XML, this schema syntax is [XML Schema Definition (XSD)](https://www.w

Each tool will have its own way to provide for validation. Bindings or configurations to link documents to schemas can be maintained either inside or outside the documents themselves; many tools offer several ways to do this.

Some tools support self-contained validation functionality without full-fledged application frameworks or development environments, with tools like [`xmllint`](http://xmlsoft.org/xmllint.html) offering command-line interfaces. Similarly, you can use the [`ajv-cli`](https://github.com/ajv-validator/ajv-cli) for JSON.
Some tools support self-contained validation functionality without full-fledged application frameworks or development environments, with tools like [`xmllint`](https://linux.die.net/man/1/xmllint/) offering command-line interfaces. Similarly, you can use the [`ajv-cli`](https://github.com/ajv-validator/ajv-cli) for JSON.

## What does success look like?

Expand Down
4 changes: 2 additions & 2 deletions build/ci-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Not every script above is run with every pull request as part of the CI/CD syste

The bash scripts used in the CI/CD workflow can be run locally in the correct environment. In addition to a bash shell, to run these scripts the following must be installed:

- [xmlint](http://xmlsoft.org/xmllint.html)
- Java 8.0 or greater
- [xmlint](https://linux.die.net/man/1/xmllint/)
- Java 11 or greater
- [Apache Maven](https://maven.apache.org/) 3.6.1 or greater
- [Node.js and Node Package Manager (NPM)](https://nodejs.org/en/) 10.15.3 or greater
- 'Another Json Validator' Command Line Interface ([ajv-cli](https://github.com/jessedc/ajv-cli)) v3.0.0 or greater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This code provides test coverage to validate the OSCAL artifacts as new document
### Pre-Requisites

1. [Python 2.7.10 or greater](https://www.python.org/)
2. [xmllint](http://xmlsoft.org/xmllint.html)
2. [xmllint](https://linux.die.net/man/1/xmllint/)
3. Java 8.0 or greater
4. [Saxon 10 HE](http://saxon.sourceforge.net/)

Expand Down
2 changes: 1 addition & 1 deletion docs/content/contribute/dev-lunch/meeting-2020-05-07.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ sidenav:

## Notes

- There is interest in having the model discussion. A Doodle pool will be sent to the [email protected] mailing list to find a good day.
- There is interest in having the model discussion. A Doodle pool will be sent to the oscal-dev@list.nist.gov mailing list to find a good day.
2 changes: 1 addition & 1 deletion docs/content/contribute/dev-lunch/meeting-2020-05-21.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ sidenav:

## Notes

- The Doodle pool results show that Fridays @ 10am EDT are the best time to have the model review meeting. The OSCAL team will send out a meeting invite for this time to the [email protected] mailing list.
- The Doodle pool results show that Fridays @ 10am EDT are the best time to have the model review meeting. The OSCAL team will send out a meeting invite for this time to the [oscal-dev@list.nist.gov](mailto:[email protected]) mailing list.
1 change: 1 addition & 0 deletions src/metaschema/oscal_implementation-common_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<!-- ========================================================================================================== -->
&allowed-values-component_component_link-rel;
<enum value="uses-network">This component uses the network provided by the identified network component.</enum>
<enum value="imported-from">The hyperlink identifies a URI pointing to the <code>component</code> in a <code>component-definition</code> that originally defined the <code>component</code>.</enum>
</allowed-values>

<allowed-values target="responsible-role/@role-id" allow-other="yes">
Expand Down
4 changes: 4 additions & 0 deletions src/metaschema/oscal_ssp_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,10 @@
<field ref="remarks" in-xml="WITH_WRAPPER"/>
</model>
<constraint>
<allowed-values target="link/@rel" allow-other="yes">
<!-- TODO: More work needs to be done around link enforcement constraints and requires Metaschema work on recurse-depth-first() recursive index searching. -->
<enum value="imported-from">The hyperlink identifies a URI pointing to the <code>component</code> in a <code>component-definition</code> that originally defined the <code>component</code>.</enum>
</allowed-values>
<allowed-values target=".//responsible-role/@role-id" allow-other="yes">
&allowed-values-responsible-roles-operations;
&allowed-values-responsible-roles-component-production;
Expand Down
4 changes: 2 additions & 2 deletions xml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ XML Schema based on the [XML Schema Definition Language (XSD) 1.1](https://www.w

## Validating OSCAL XML Content

The OSCAL project uses [xmllint](http://xmlsoft.org/xmllint.html) to perform automated validation of all XML-based OSCAL [content](../content) provided in this repository. *xmllint* is an open source tool that can be [downloaded](http://xmlsoft.org/downloads.html), installed, and run on OSX, Linux, and Windows environments.
The OSCAL project uses [xmllint](https://linux.die.net/man/1/xmllint/) to perform automated validation of all XML-based OSCAL [content](../content) provided in this repository. *xmllint* is an open source tool that can be downloaded, installed, and run on OSX, Linux, and Windows environments with your preferred package manager.

The following example uses **xmllint** to perform validation of an OSCAL catalog XML file.

```
xmllint --noout --schema "oscal_catalog_schema.xsd" "catalog.xml"
```

The [online documentation](http://xmlsoft.org/xmllint.html) for *xmllint* provides more information on the commandline arguments.
The [online documentation](https://linux.die.net/man/1/xmllint/) for *xmllint* provides more information on the commandline arguments.

# OSCAL JSON to XML Converters

Expand Down

0 comments on commit eeb54c1

Please sign in to comment.