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 Aug 25, 2022
1 parent 3198f05 commit 6489d47
Show file tree
Hide file tree
Showing 8 changed files with 412 additions and 680 deletions.
167 changes: 80 additions & 87 deletions json/convert/oscal_complete_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,86 @@
</xsl:for-each-group>
</assembly>
</xsl:template>
<xsl:template match="confidentiality-impact"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="impact"
key="confidentiality-impact"
gi="confidentiality-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">confidentiality-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="integrity-impact"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="impact" key="integrity-impact" gi="integrity-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">integrity-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="availability-impact"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="impact" key="availability-impact" gi="availability-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">availability-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="security-impact-level"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
Expand Down Expand Up @@ -12387,35 +12467,6 @@
</value>
</field>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/confidentiality-impact"
priority="7"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="confidentiality-impact"
key="confidentiality-impact"
gi="confidentiality-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">confidentiality-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/confidentiality-impact/link/text"
priority="10"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down Expand Up @@ -12492,35 +12543,6 @@
</value>
</field>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/integrity-impact"
priority="7"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="integrity-impact"
key="integrity-impact"
gi="integrity-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">integrity-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/integrity-impact/link/text"
priority="10"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down Expand Up @@ -12597,35 +12619,6 @@
</value>
</field>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/availability-impact"
priority="7"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="availability-impact"
key="availability-impact"
gi="availability-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">availability-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/availability-impact/link/text"
priority="10"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
167 changes: 80 additions & 87 deletions json/convert/oscal_ssp_xml-to-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,86 @@
</xsl:for-each-group>
</assembly>
</xsl:template>
<xsl:template match="confidentiality-impact"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="impact"
key="confidentiality-impact"
gi="confidentiality-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">confidentiality-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="integrity-impact"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="impact" key="integrity-impact" gi="integrity-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">integrity-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="availability-impact"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="impact" key="availability-impact" gi="availability-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">availability-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="security-impact-level"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
Expand Down Expand Up @@ -2669,35 +2749,6 @@
</value>
</field>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/confidentiality-impact"
priority="7"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="confidentiality-impact"
key="confidentiality-impact"
gi="confidentiality-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">confidentiality-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/confidentiality-impact/link/text"
priority="10"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down Expand Up @@ -2774,35 +2825,6 @@
</value>
</field>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/integrity-impact"
priority="7"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="integrity-impact"
key="integrity-impact"
gi="integrity-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">integrity-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/integrity-impact/link/text"
priority="10"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down Expand Up @@ -2879,35 +2901,6 @@
</value>
</field>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/availability-impact"
priority="7"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
<xsl:param name="with-key" select="true()"/>
<assembly name="availability-impact"
key="availability-impact"
gi="availability-impact">
<xsl:if test="$with-key">
<xsl:attribute name="key">availability-impact</xsl:attribute>
</xsl:if>
<xsl:for-each-group select="prop" group-by="true()">
<group in-json="ARRAY" key="props">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:for-each-group select="link" group-by="true()">
<group in-json="ARRAY" key="links">
<xsl:apply-templates select="current-group()">
<xsl:with-param name="with-key" select="false()"/>
</xsl:apply-templates>
</group>
</xsl:for-each-group>
<xsl:apply-templates select="base"/>
<xsl:apply-templates select="selected"/>
<xsl:apply-templates select="adjustment-justification"/>
</assembly>
</xsl:template>
<xsl:template match="system-security-plan/system-characteristics/system-information/information-type/availability-impact/link/text"
priority="10"
xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0">
Expand Down
Loading

0 comments on commit 6489d47

Please sign in to comment.