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 aj-stein-nist committed Feb 6, 2023
1 parent 337cb5b commit a425697
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 8 deletions.
4 changes: 3 additions & 1 deletion json/convert/oscal_complete_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1080,12 +1080,13 @@
<xsl:template match="remove"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly as-type="empty" name="remove" gi="remove">
<assembly name="remove" gi="remove">
<xsl:apply-templates select="@by-name"/>
<xsl:apply-templates select="@by-class"/>
<xsl:apply-templates select="@by-id"/>
<xsl:apply-templates select="@by-item-name"/>
<xsl:apply-templates select="@by-ns"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
<xsl:template match="add" xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down Expand Up @@ -1122,6 +1123,7 @@
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
<xsl:template match="component-definition"
Expand Down
4 changes: 3 additions & 1 deletion json/convert/oscal_profile_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -673,12 +673,13 @@
<xsl:template match="remove"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly as-type="empty" name="remove" gi="remove">
<assembly name="remove" gi="remove">
<xsl:apply-templates select="@by-name"/>
<xsl:apply-templates select="@by-class"/>
<xsl:apply-templates select="@by-id"/>
<xsl:apply-templates select="@by-item-name"/>
<xsl:apply-templates select="@by-ns"/>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
<xsl:template match="add" xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down Expand Up @@ -715,6 +716,7 @@
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="remarks"/>
</assembly>
</xsl:template>
<xsl:template match="back-matter"
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 @@ -1485,7 +1485,9 @@
"by-ns" :
{ "title" : "Item Namespace Reference",
"description" : "Identify items to remove by the item's ns, which is the namespace associated with a part, or prop.",
"$ref" : "#/definitions/TokenDatatype" } },
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"additionalProperties" : false },
"oscal-complete-oscal-profile:add" :
{ "title" : "Addition",
Expand Down Expand Up @@ -1532,7 +1534,9 @@
{ "type" : "array",
"minItems" : 1,
"items" :
{ "$ref" : "#assembly_oscal-catalog-common_part" } } },
{ "$ref" : "#assembly_oscal-catalog-common_part" } },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"additionalProperties" : false },
"oscal-complete-oscal-component-definition:component-definition" :
{ "title" : "Component Definition",
Expand Down
8 changes: 6 additions & 2 deletions json/schema/oscal_profile_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@
"by-ns" :
{ "title" : "Item Namespace Reference",
"description" : "Identify items to remove by the item's ns, which is the namespace associated with a part, or prop.",
"$ref" : "#/definitions/TokenDatatype" } },
"$ref" : "#/definitions/TokenDatatype" },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"additionalProperties" : false },
"oscal-profile-oscal-profile:add" :
{ "title" : "Addition",
Expand Down Expand Up @@ -389,7 +391,9 @@
{ "type" : "array",
"minItems" : 1,
"items" :
{ "$ref" : "#assembly_oscal-catalog-common_part" } } },
{ "$ref" : "#assembly_oscal-catalog-common_part" } },
"remarks" :
{ "$ref" : "#field_oscal-metadata_remarks" } },
"additionalProperties" : false },
"oscal-profile-oscal-metadata:metadata" :
{ "title" : "Publication metadata",
Expand Down
4 changes: 3 additions & 1 deletion xml/convert/oscal_complete_json-to-xml-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,13 @@
<xsl:template match="j:array[@key='removes']/j:map">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="remove" -->
<assembly as-type="empty" name="remove" gi="remove">
<assembly name="remove" gi="remove">
<xsl:apply-templates select="*[@key='by-name']"/>
<xsl:apply-templates select="*[@key='by-class']"/>
<xsl:apply-templates select="*[@key='by-id']"/>
<xsl:apply-templates select="*[@key='by-item-name']"/>
<xsl:apply-templates select="*[@key='by-ns']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:array[@key='adds']/j:map">
Expand All @@ -559,6 +560,7 @@
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='parts']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:map[@key='component-definition']">
Expand Down
4 changes: 3 additions & 1 deletion xml/convert/oscal_profile_json-to-xml-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,13 @@
<xsl:template match="j:array[@key='removes']/j:map">
<xsl:param name="with-key" select="true()"/>
<!-- XML match="remove" -->
<assembly as-type="empty" name="remove" gi="remove">
<assembly name="remove" gi="remove">
<xsl:apply-templates select="*[@key='by-name']"/>
<xsl:apply-templates select="*[@key='by-class']"/>
<xsl:apply-templates select="*[@key='by-id']"/>
<xsl:apply-templates select="*[@key='by-item-name']"/>
<xsl:apply-templates select="*[@key='by-ns']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:array[@key='adds']/j:map">
Expand All @@ -370,6 +371,7 @@
<xsl:apply-templates select="*[@key='props']"/>
<xsl:apply-templates select="*[@key='links']"/>
<xsl:apply-templates select="*[@key='parts']"/>
<xsl:apply-templates select="*[@key='remarks']"/>
</assembly>
</xsl:template>
<xsl:template match="j:map[@key='back-matter']">
Expand Down
28 changes: 28 additions & 0 deletions xml/schema/oscal_complete_schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -2453,6 +2453,21 @@
<xs:documentation>
<b>Removal</b>: Specifies objects to be removed from a control based on specific aspects of the object that must all match.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="remarks" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<m:formal-name>Remarks</m:formal-name>
<m:description>Additional commentary on the containing object.</m:description>
</xs:appinfo>
<xs:documentation>
<b>Remarks</b>: Additional commentary on the containing object.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:group ref="blockElementGroup" maxOccurs="unbounded" minOccurs="0"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="by-name" type="TokenDatatype">
<xs:annotation>
<xs:appinfo>
Expand Down Expand Up @@ -2546,6 +2561,19 @@
type="oscal-catalog-common-part-ASSEMBLY"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="remarks" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<m:formal-name>Remarks</m:formal-name>
<m:description>Additional commentary on the containing object.</m:description>
</xs:appinfo>
<xs:documentation>
<b>Remarks</b>: Additional commentary on the containing object.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:group ref="blockElementGroup" maxOccurs="unbounded" minOccurs="0"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="position" type="TokenDatatype">
<xs:annotation>
Expand Down
28 changes: 28 additions & 0 deletions xml/schema/oscal_profile_schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,21 @@
<xs:documentation>
<b>Removal</b>: Specifies objects to be removed from a control based on specific aspects of the object that must all match.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="remarks" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<m:formal-name>Remarks</m:formal-name>
<m:description>Additional commentary on the containing object.</m:description>
</xs:appinfo>
<xs:documentation>
<b>Remarks</b>: Additional commentary on the containing object.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:group ref="blockElementGroup" maxOccurs="unbounded" minOccurs="0"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="by-name" type="TokenDatatype">
<xs:annotation>
<xs:appinfo>
Expand Down Expand Up @@ -593,6 +608,19 @@
type="oscal-catalog-common-part-ASSEMBLY"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="remarks" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<m:formal-name>Remarks</m:formal-name>
<m:description>Additional commentary on the containing object.</m:description>
</xs:appinfo>
<xs:documentation>
<b>Remarks</b>: Additional commentary on the containing object.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:group ref="blockElementGroup" maxOccurs="unbounded" minOccurs="0"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="position" type="TokenDatatype">
<xs:annotation>
Expand Down

0 comments on commit a425697

Please sign in to comment.