Skip to content

Commit 44d82ec

Browse files
committed
[WIP] Bump 1st example model version and constraints for #545
1 parent f5a79e1 commit 44d82ec

File tree

1 file changed

+5
-1
lines changed
  • website/content/tutorials/5-constraints-has-cardinality

1 file changed

+5
-1
lines changed

website/content/tutorials/5-constraints-has-cardinality/_index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ We will begin where we left off in the previous tutorial, with the model and con
1818
<?xml-model href="https://raw.githubusercontent.com/usnistgov/metaschema/develop/schema/xml/metaschema.xsd" type="application/xml" schematypens="http://www.w3.org/2001/XMLSchema"?>
1919
<METASCHEMA xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0">
2020
<schema-name>Computer Model</schema-name>
21-
<schema-version>0.0.11</schema-version>
21+
<schema-version>0.0.12</schema-version>
2222
<short-name>computer</short-name>
2323
<namespace>http://example.com/ns/computer</namespace>
2424
<json-base-uri>http://example.com/ns/computer</json-base-uri>
@@ -326,6 +326,10 @@ We will begin where we left off in the previous tutorial, with the model and con
326326
<expect id="memory-same-byte-size" level="ERROR" target="." test="if (count(./memory/byte-size) > 0) then (sum(./memory/byte-size) mod ./memory/byte-size[1]) = 0 else (sum(./memory/size) mod ./memory/size[1]) = 0">
327327
<message>All memory modules SHOULD be the same size or byte-size for a computer.</message>
328328
</expect>
329+
<has-cardinality id="atx-memory-count-allowed" level="ERROR" target="motherboard[@type='atx']/memory" min-occurs="1" max-occurs="4"/>
330+
<has-cardinality id="atx-ata-sockets-count-allowed" level="ERROR" target="motherboard[@type='atx']/ata-socket" min-occurs="0" max-occurs="1"/>
331+
<has-cardinality id="mini-itx-memory-count-allowed" level="ERROR" target="motherboard[@type='mini-atx']/memory" min-occurs="1" max-occurs="2"/>
332+
<has-cardinality id="mini-itx-ata-sockets-count-allowed" level="ERROR" target="motherboard[@type='mini-atx']/ata-socket" min-occurs="0" max-occurs="0"/>
329333
</constraint>
330334
</define-assembly>
331335
</model>

0 commit comments

Comments
 (0)