Skip to content

Commit

Permalink
Added Metaschema module based on the Static Analysis Results Intercha…
Browse files Browse the repository at this point in the history
…nge Format (SARIF). This uses usnistgov#519 as a starting point.
  • Loading branch information
david-waltermire committed Jul 24, 2024
1 parent b567c1e commit d5e81d6
Show file tree
Hide file tree
Showing 3 changed files with 519 additions and 4 deletions.
4 changes: 2 additions & 2 deletions schema/metaschema/metaschema-module-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<context>
<metapath target="/METASCHEMA"/>
<constraints>
<let var="all-imports" expression="recurse-depth(.,'doc(resolve-uri(import/@href))/METASCHEMA'"/>
<let var="all-imports" expression="recurse-depth(.,'doc(resolve-uri(import/@href))/METASCHEMA')"/>
<index id="metaschema-short-name-unique" target="(.|$all-imports)" name="metaschema-metadata-short-name-index">
<formal-name>Unique Module Short Names</formal-name>
<description>Ensures that the current and all imported modules have a unique short name.</description>
Expand Down Expand Up @@ -35,7 +35,7 @@
<description>Ensure each import has a resolvable @href.</description>
<message>Unable to access a Metaschema module at '{{ resolve-uri(@href) }}'.</message>
</expect>
<expect id="metaschema-import-href-is-module" target="." test="exists(doc(resolve-uri(import/@href))/METASCHEMA)">
<expect id="metaschema-import-href-is-module" target="." test="doc(resolve-uri(import/@href))/METASCHEMA ! exists(.)">
<formal-name>Import is Resolvable</formal-name>
<description>Ensure each import is a Metaschema module.</description>
<message>Unable the resource at '{{ resolve-uri(@href) }}' is not a Metaschema module.</message>
Expand Down
6 changes: 4 additions & 2 deletions schema/metaschema/metaschema-module-metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,8 @@
</model>
</define-assembly>
<assembly ref="metapath-context" min-occurs="1" max-occurs="unbounded">
<group-as name="metapath-contexts" in-json="ARRAY"/>
<use-name>context</use-name>
<group-as name="contexts" in-json="ARRAY"/>
</assembly>
</model>
</define-assembly>
Expand All @@ -1334,7 +1335,8 @@
<use-name>constraints</use-name>
</assembly>
<assembly ref="metapath-context" max-occurs="unbounded">
<group-as name="metapath-contexts" in-json="ARRAY"/>
<use-name>context</use-name>
<group-as name="contexts" in-json="ARRAY"/>
</assembly>
<field ref="remarks"/>
</model>
Expand Down
Loading

0 comments on commit d5e81d6

Please sign in to comment.