Skip to content

Commit

Permalink
Publishing generated metaschema resources [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire-nist authored and github-actions[bot] committed Sep 27, 2022
1 parent b866b52 commit 80878bf
Show file tree
Hide file tree
Showing 36 changed files with 11,516 additions and 9,949 deletions.
321 changes: 170 additions & 151 deletions json/convert/oscal_assessment-plan_xml-to-json-converter.xsl

Large diffs are not rendered by default.

321 changes: 170 additions & 151 deletions json/convert/oscal_assessment-results_xml-to-json-converter.xsl

Large diffs are not rendered by default.

325 changes: 172 additions & 153 deletions json/convert/oscal_catalog_xml-to-json-converter.xsl

Large diffs are not rendered by default.

1,384 changes: 1,198 additions & 186 deletions json/convert/oscal_complete_xml-to-json-converter.xsl

Large diffs are not rendered by default.

304 changes: 157 additions & 147 deletions json/convert/oscal_component_xml-to-json-converter.xsl

Large diffs are not rendered by default.

310 changes: 162 additions & 148 deletions json/convert/oscal_mapping_xml-to-json-converter.xsl

Large diffs are not rendered by default.

303 changes: 156 additions & 147 deletions json/convert/oscal_poam_xml-to-json-converter.xsl

Large diffs are not rendered by default.

318 changes: 166 additions & 152 deletions json/convert/oscal_profile_xml-to-json-converter.xsl

Large diffs are not rendered by default.

303 changes: 156 additions & 147 deletions json/convert/oscal_ssp_xml-to-json-converter.xsl

Large diffs are not rendered by default.

582 changes: 287 additions & 295 deletions json/schema/oscal_assessment-plan_schema.json

Large diffs are not rendered by default.

582 changes: 287 additions & 295 deletions json/schema/oscal_assessment-results_schema.json

Large diffs are not rendered by default.

592 changes: 292 additions & 300 deletions json/schema/oscal_catalog_schema.json

Large diffs are not rendered by default.

718 changes: 355 additions & 363 deletions json/schema/oscal_complete_schema.json

Large diffs are not rendered by default.

586 changes: 289 additions & 297 deletions json/schema/oscal_component_schema.json

Large diffs are not rendered by default.

506 changes: 249 additions & 257 deletions json/schema/oscal_mapping_schema.json

Large diffs are not rendered by default.

582 changes: 287 additions & 295 deletions json/schema/oscal_poam_schema.json

Large diffs are not rendered by default.

666 changes: 329 additions & 337 deletions json/schema/oscal_profile_schema.json

Large diffs are not rendered by default.

572 changes: 282 additions & 290 deletions json/schema/oscal_ssp_schema.json

Large diffs are not rendered by default.

152 changes: 86 additions & 66 deletions xml/convert/oscal_assessment-plan_json-to-xml-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -157,53 +157,6 @@
<xsl:apply-templates select="*[@key='text']"/>
</assembly>
</xsl:template>
<xsl:template match="j:array[@key='roles']/j:map">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="role" -->
<assembly name="role" gi="role">
<xsl:apply-templates select="*[@key='id']"/>
<xsl:apply-templates select="*[@key='title']"/>
<xsl:apply-templates select="*[@key='short-name']"/>
<xsl:apply-templates select="*[@key='description']"/>
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:array[@key='locations']/j:map">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="location" -->
<assembly name="location" gi="location">
<xsl:apply-templates select="*[@key='uuid']"/>
<xsl:apply-templates select="*[@key='title']"/>
<xsl:apply-templates select="*[@key='address']"/>
<xsl:apply-templates select="*[@key='email-addresses']"/>
<xsl:apply-templates select="*[@key='telephone-numbers']"/>
<xsl:apply-templates select="*[@key='urls']"/>
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:array[@key='parties']/j:map">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="party" -->
<assembly name="party" gi="party">
<xsl:apply-templates select="*[@key='uuid']"/>
<xsl:apply-templates select="*[@key='type']"/>
<xsl:apply-templates select="*[@key='name']"/>
<xsl:apply-templates select="*[@key='short-name']"/>
<xsl:apply-templates select="*[@key='external-ids']"/>
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='email-addresses']"/>
<xsl:apply-templates select="*[@key='telephone-numbers']"/>
<xsl:apply-templates select="*[@key='addresses']"/>
<xsl:apply-templates select="*[@key='location-uuids']"/>
<xsl:apply-templates select="*[@key='member-of-organizations']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:array[@key='responsible-parties']/j:map">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="responsible-party" -->
Expand Down Expand Up @@ -684,7 +637,12 @@
mode="keep-value-property"
priority="8"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='props']/j:map/j:string[@key='ns']" priority="1"><!-- XML match="prop/@ns" -->
<flag in-json="string" as-type="uri" name="ns" key="ns" gi="ns">
<flag in-json="string"
as-type="uri"
name="ns"
key="ns"
default="http://csrc.nist.gov/ns/oscal"
gi="ns">
<xsl:value-of select="."/>
</flag>
</xsl:template>
Expand Down Expand Up @@ -776,16 +734,17 @@
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='document-ids']/j:map/j:string[@key='scheme'] | j:map[@key='assessment-plan']/j:map[@key='back-matter']/j:array[@key='resources']/j:map/j:array[@key='document-ids']/j:map/j:string[@key='scheme']"
mode="keep-value-property"
priority="6"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='roles']/j:map/j:string[@key='id']" priority="1"><!-- XML match="role/@id" -->
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='roles']/j:map/j:string[@key='id']"
priority="6"><!-- XML match="assessment-plan/metadata/role/@id" -->
<flag in-json="string" as-type="token" name="id" key="id" gi="id">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="j:array[@key='roles']/j:map/j:string[@key='id']"
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='roles']/j:map/j:string[@key='id']"
mode="keep-value-property"
priority="6"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='locations']/j:map/j:string[@key='uuid']"
priority="1"><!-- XML match="location/@uuid" -->
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='locations']/j:map/j:string[@key='uuid']"
priority="6"><!-- XML match="assessment-plan/metadata/location/@uuid" -->
<flag in-json="string"
as-type="uuid"
name="uuid"
Expand All @@ -794,7 +753,7 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="j:array[@key='locations']/j:map/j:string[@key='uuid']"
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='locations']/j:map/j:string[@key='uuid']"
mode="keep-value-property"
priority="6"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='locations']/j:map/j:map[@key='address']/j:string[@key='type'] | j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:array[@key='addresses']/j:map/j:string[@key='type']"><!-- XML match="assessment-plan/metadata/location/address/@type | assessment-plan/metadata/party/address/@type" -->
Expand Down Expand Up @@ -822,8 +781,8 @@
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='locations']/j:map/j:array[@key='telephone-numbers']/j:map/j:string[@key='type'] | j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:array[@key='telephone-numbers']/j:map/j:string[@key='type']"
mode="keep-value-property"
priority="8"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='parties']/j:map/j:string[@key='uuid']"
priority="1"><!-- XML match="party/@uuid" -->
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:string[@key='uuid']"
priority="6"><!-- XML match="assessment-plan/metadata/party/@uuid" -->
<flag in-json="string"
as-type="uuid"
name="uuid"
Expand All @@ -832,11 +791,11 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="j:array[@key='parties']/j:map/j:string[@key='uuid']"
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:string[@key='uuid']"
mode="keep-value-property"
priority="6"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='parties']/j:map/j:string[@key='type']"
priority="1"><!-- XML match="party/@type" -->
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:string[@key='type']"
priority="6"><!-- XML match="assessment-plan/metadata/party/@type" -->
<flag in-json="string"
as-type="string"
name="type"
Expand All @@ -845,7 +804,7 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="j:array[@key='parties']/j:map/j:string[@key='type']"
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:string[@key='type']"
mode="keep-value-property"
priority="6"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:array[@key='external-ids']/j:map/j:string[@key='scheme']"
Expand Down Expand Up @@ -1125,7 +1084,12 @@
mode="keep-value-property"
priority="8"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='parts']/j:map/j:string[@key='ns']" priority="1"><!-- XML match="part/@ns" -->
<flag in-json="string" as-type="uri" name="ns" key="ns" gi="ns">
<flag in-json="string"
as-type="uri"
name="ns"
key="ns"
default="http://csrc.nist.gov/ns/oscal"
gi="ns">
<xsl:value-of select="."/>
</flag>
</xsl:template>
Expand Down Expand Up @@ -1219,7 +1183,12 @@
mode="keep-value-property"
priority="6"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='parts']/j:map/j:string[@key='ns']" priority="1"><!-- XML match="part/@ns" -->
<flag in-json="string" as-type="uri" name="ns" key="ns" gi="ns">
<flag in-json="string"
as-type="uri"
name="ns"
key="ns"
default="http://csrc.nist.gov/ns/oscal"
gi="ns">
<xsl:value-of select="."/>
</flag>
</xsl:template>
Expand Down Expand Up @@ -1470,7 +1439,7 @@
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='back-matter']/j:array[@key='resources']/j:map/j:map[@key='base64']/j:string[@key='filename']"
priority="7"><!-- XML match="assessment-plan/back-matter/resource/base64/@filename" -->
<flag in-json="string"
as-type="uri-reference"
as-type="token"
name="filename"
key="filename"
gi="filename">
Expand Down Expand Up @@ -1817,6 +1786,20 @@
<xsl:value-of select="."/>
</value>
</xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='roles']/j:map"
priority="5">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="assessment-plan/metadata/role" -->
<assembly name="role" gi="role">
<xsl:apply-templates select="*[@key='id']"/>
<xsl:apply-templates select="*[@key='title']"/>
<xsl:apply-templates select="*[@key='short-name']"/>
<xsl:apply-templates select="*[@key='description']"/>
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='roles']/j:map/j:string[@key='title']"
priority="6">
<xsl:param name="with-key" select="true()"/>
Expand Down Expand Up @@ -1910,6 +1893,22 @@
<xsl:value-of select="."/>
</value>
</xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='locations']/j:map"
priority="5">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="assessment-plan/metadata/location" -->
<assembly name="location" gi="location">
<xsl:apply-templates select="*[@key='uuid']"/>
<xsl:apply-templates select="*[@key='title']"/>
<xsl:apply-templates select="*[@key='address']"/>
<xsl:apply-templates select="*[@key='email-addresses']"/>
<xsl:apply-templates select="*[@key='telephone-numbers']"/>
<xsl:apply-templates select="*[@key='urls']"/>
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='locations']/j:map/j:string[@key='title']"
priority="6">
<xsl:param name="with-key" select="true()"/>
Expand Down Expand Up @@ -2105,6 +2104,7 @@
<field collapsible="no"
as-type="uri"
name="url"
deprecated="1.1.0"
gi="url"
in-json="SCALAR">
<xsl:apply-templates select="." mode="get-value-property"/>
Expand Down Expand Up @@ -2140,6 +2140,26 @@
<xsl:value-of select="."/>
</value>
</xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map"
priority="5">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="assessment-plan/metadata/party" -->
<assembly name="party" gi="party">
<xsl:apply-templates select="*[@key='uuid']"/>
<xsl:apply-templates select="*[@key='type']"/>
<xsl:apply-templates select="*[@key='name']"/>
<xsl:apply-templates select="*[@key='short-name']"/>
<xsl:apply-templates select="*[@key='external-ids']"/>
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='email-addresses']"/>
<xsl:apply-templates select="*[@key='telephone-numbers']"/>
<xsl:apply-templates select="*[@key='addresses']"/>
<xsl:apply-templates select="*[@key='location-uuids']"/>
<xsl:apply-templates select="*[@key='member-of-organizations']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:map[@key='assessment-plan']/j:map[@key='metadata']/j:array[@key='parties']/j:map/j:string[@key='name']"
priority="6">
<xsl:param name="with-key" select="true()"/>
Expand Down Expand Up @@ -2991,8 +3011,8 @@
<field scope="local"
_step="prose"
_key="prose"
_metaschema-xml-id="/assembly/oscal-catalog-common/part/prose"
_metaschema-json-id="/assembly/oscal-catalog-common/part/prose"
_metaschema-xml-id="/assembly/oscal-control-common/part/prose"
_metaschema-json-id="/assembly/oscal-control-common/part/prose"
in-xml="UNWRAPPED"
collapsible="no"
as-type="markup-multiline"
Expand All @@ -3002,8 +3022,8 @@
_in-xml-name="p ul ol pre table h1 h2 h3 h4 h5 h6"
_in-json-name="prose">
<value as-type="markup-multiline"
_metaschema-xml-id="/assembly/oscal-catalog-common/part/prose/PROSE"
_metaschema-json-id="/assembly/oscal-catalog-common/part/prose/PROSE"
_metaschema-xml-id="/assembly/oscal-control-common/part/prose/PROSE"
_metaschema-json-id="/assembly/oscal-control-common/part/prose/PROSE"
in-json="string">
<xsl:value-of select="."/>
</value>
Expand Down
Loading

0 comments on commit 80878bf

Please sign in to comment.