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 david-waltermire committed Aug 23, 2022
1 parent 9df3a0d commit 5749ad1
Show file tree
Hide file tree
Showing 36 changed files with 366 additions and 15 deletions.
12 changes: 12 additions & 0 deletions json/convert/oscal_assessment-plan_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -1210,6 +1211,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_assessment-results_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -1668,6 +1669,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_catalog_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -872,6 +873,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_complete_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -2975,6 +2976,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_component_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -677,6 +678,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_mapping_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -649,6 +650,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_poam_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -1191,6 +1192,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_profile_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -797,6 +798,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
12 changes: 12 additions & 0 deletions json/convert/oscal_ssp_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
<xsl:apply-templates select="@ns"/>
<xsl:apply-templates select="@value"/>
<xsl:apply-templates select="@class"/>
<xsl:apply-templates select="@group"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -1082,6 +1083,17 @@
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="prop/@group"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="link/@href"
priority="1"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
4 changes: 4 additions & 0 deletions json/schema/oscal_assessment-plan_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down
4 changes: 4 additions & 0 deletions json/schema/oscal_assessment-results_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down
8 changes: 6 additions & 2 deletions json/schema/oscal_catalog_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down Expand Up @@ -1040,8 +1044,8 @@
[ "control",
"statement" ] } ] },
"id-ref" :
{ "title" : "Subject Type",
"description" : "The semantic type of the subject.",
{ "title" : "Subject Identifier Reference",
"description" : "A reference to an identified subject that is of the specified type.",
"$ref" : "#/definitions/StringDatatype" },
"props" :
{ "type" : "array",
Expand Down
8 changes: 6 additions & 2 deletions json/schema/oscal_complete_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down Expand Up @@ -1040,8 +1044,8 @@
[ "control",
"statement" ] } ] },
"id-ref" :
{ "title" : "Subject Type",
"description" : "The semantic type of the subject.",
{ "title" : "Subject Identifier Reference",
"description" : "A reference to an identified subject that is of the specified type.",
"$ref" : "#/definitions/StringDatatype" },
"props" :
{ "type" : "array",
Expand Down
4 changes: 4 additions & 0 deletions json/schema/oscal_component_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down
8 changes: 6 additions & 2 deletions json/schema/oscal_mapping_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down Expand Up @@ -759,8 +763,8 @@
[ "control",
"statement" ] } ] },
"id-ref" :
{ "title" : "Subject Type",
"description" : "The semantic type of the subject.",
{ "title" : "Subject Identifier Reference",
"description" : "A reference to an identified subject that is of the specified type.",
"$ref" : "#/definitions/StringDatatype" },
"props" :
{ "type" : "array",
Expand Down
4 changes: 4 additions & 0 deletions json/schema/oscal_poam_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down
4 changes: 4 additions & 0 deletions json/schema/oscal_profile_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down
4 changes: 4 additions & 0 deletions json/schema/oscal_ssp_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,10 @@
{ "title" : "Property Class",
"description" : "A textual label that provides a sub-type or characterization of the property's name. This can be used to further distinguish or discriminate between the semantics of multiple properties of the same object with the same name and ns.",
"$ref" : "#/definitions/TokenDatatype" },
"group" :
{ "title" : "Property Group",
"description" : "An identifier for relating distinct sets of properties.",
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"required" :
Expand Down
13 changes: 13 additions & 0 deletions xml/convert/oscal_assessment-plan_json-to-xml-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<xsl:apply-templates select="*[@key='ns']"/>
<xsl:apply-templates select="*[@key='value']"/>
<xsl:apply-templates select="*[@key='class']"/>
<xsl:apply-templates select="*[@key='group']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
Expand Down Expand Up @@ -699,6 +700,18 @@
<xsl:template match="j:array[@key='props']/j:map/j:string[@key='class']"
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='group']" priority="1"><!-- XML match="prop/@group" -->
<flag in-json="string"
as-type="token"
name="group"
key="group"
gi="group">
<xsl:value-of select="."/>
</flag>
</xsl:template>
<xsl:template match="j:array[@key='props']/j:map/j:string[@key='group']"
mode="keep-value-property"
priority="8"><!-- Not keeping the flag here. --></xsl:template>
<xsl:template match="j:array[@key='links']/j:map/j:string[@key='href']" priority="1"><!-- XML match="link/@href" -->
<flag in-json="string"
as-type="uri-reference"
Expand Down
Loading

0 comments on commit 5749ad1

Please sign in to comment.