Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "COSMOS SML Test Plan"

(Introduction)
Line 17: Line 17:
 
Tests that check for valid cycles using <code>sml:acyclic</code>
 
Tests that check for valid cycles using <code>sml:acyclic</code>
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/InValidCycles.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
<td>InvalidCyclesWithAcyclicReferences</td>
+
| This test verifies that it is an error to create cycles with instances of acyclic references
<td>acyclic\InValidCycles.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/InValidCycles.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that it is an error to create cycles with instances of acyclic references</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/InValidDerivation.xml?root=Technology_Project&view=markup InvalidDerivationWithAcyclicAttribute]
 
+
| A model is invalid if it has a reference type R1 with sml:acyclic=?true? and another reference type R2 derived from R1 such that sml:acyclic=?false?
<tr>
+
| .
<td>InvalidDerivationWithAcyclicAttribute</td>
+
|-
<td>acyclic\InValidDerivation.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/InValidDerivation.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidateDefinition.xml?root=Technology_Project&view=markup ValidateAcyclicDefinition]
<td>A model is invalid if it has a reference type R1 with sml:acyclic=?true? and another reference type R2 derived from R1 such that sml:acyclic=?false?</td>
+
| This test returns a warning if the sml:acyclic attribute is defined on an element declaration
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidCycles1.xml?root=Technology_Project&view=markup ValidCyclesWithAcyclicReference1]
<td>ValidateAcyclicDefinition</td>
+
| Let R1 and R2 be two reference types with sml:acyclic=?true?. Then a model is valid if it has inter-document cycles that using instances of both R1 and R2
<td>acyclic\ValidateDefinition.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidateDefinition.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test returns a warning if the sml:acyclic attribute is defined on an element declaration</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidCycles2.xml?root=Technology_Project&view=markup ValidCyclesWithAcyclicReference2]
 
+
| Let R1 be a reference type with sml:acyclic=?false?. Then a model is valid if it has inter-document cycles using instances of R1
<tr>
+
| .
<td>ValidCyclesWithAcyclicReference1</td>
+
|-
<td>acyclic\ValidCycles1.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidCycles1.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidCycles3.xml?root=Technology_Project&view=markup ValidCycles3]
<td>Let R1 and R2 be two reference types with sml:acyclic=?true?. Then a model is valid if it has inter-document cycles that using instances of both R1 and R2</td>
+
| This test verifies that it is valid to create cycles within documents, as long as instances of acyclic references do not create cycles.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidDerivation.xml?root=Technology_Project&view=markup ValidDerivationWithAcyclicAttribute]
<td>ValidCyclesWithAcyclicReference2</td>
+
| A model is valid if it has a reference type R1 with sml:acyclic=?false? and another reference type R2 derived from R1 such that sml:acyclic=?true?
<td>acyclic\ValidCycles2.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidCycles2.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Let R1 be a reference type with sml:acyclic=?false?. Then a model is valid if it has inter-document cycles using instances of R1</td>
+
|}
</tr>
+
 
+
<tr>
+
<td>ValidCycles3</td>
+
<td>acyclic\ValidCycles3.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidCycles3.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that it is valid to create cycles within documents, as long as instances of acyclic references do not create cycles.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidDerivationWithAcyclicAttribute</td>
+
<td>acyclic\ValidDerivation.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidDerivation.xml?root=Technology_Project&view=markup src])</td>
+
<td>A model is valid if it has a reference type R1 with sml:acyclic=?false? and another reference type R2 derived from R1 such that sml:acyclic=?true?</td>
+
</tr>
+
 
+
</table>
+
 
=== Deref Tests ===
 
=== Deref Tests ===
 
Tests that ensure proper operation of the <code>deref()</code> function
 
Tests that ensure proper operation of the <code>deref()</code> function
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/deref/Multiple.xml?root=Technology_Project&view=markup MultipleDeref]
<td>MultipleDeref</td>
+
| Verify that deref() can accept a node set of reference elements, i.e., elements for which sml:ref=?true?, and return a node set that is union of the element nodes targeted by references in the node set such that the reference targets exactly one element in the model. The returned node set must not contain any nodes for references that do not target an element in the model.
<td>deref\Multiple.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/deref/Multiple.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Verify that deref() can accept a node set of reference elements, i.e., elements for which sml:ref=?true?, and return a node set that is union of the element nodes targeted by references in the node set such that the reference targets exactly one element in the model. The returned node set must not contain any nodes for references that do not target an element in the model.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/deref/MultipleNonRoot.xml?root=Technology_Project&view=markup MultipleXpointer]
 
+
| Verify that deref() can resolve references that target non-root elements using XPointer scheme.
<tr>
+
| .
<td>MultipleXpointer</td>
+
|-
<td>deref\MultipleNonRoot.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/deref/MultipleNonRoot.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/deref/Single.xml?root=Technology_Project&view=markup SingleRef]
<td>Verify that deref() can resolve references that target non-root elements using XPointer scheme.</td>
+
| Verify that deref() can resolve a single reference. The deref() function must return a single node (i.e. a node set with a single node) that corresponds to the element node of the reference’s target when the reference targets a single element in the model.
</tr>
+
| .
 
+
|}
<tr>
+
<td>SingleRef</td>
+
<td>deref\Single.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/deref/Single.xml?root=Technology_Project&view=markup src])</td>
+
<td>Verify that deref() can resolve a single reference. The deref() function must return a single node (i.e. a node set with a single node) that corresponds to the element node of the reference’s target when the reference targets a single element in the model.</td>
+
</tr>
+
 
+
</table>
+
 
=== Identity Tests ===
 
=== Identity Tests ===
 
Tests that validate the resolution of key references to elements
 
Tests that validate the resolution of key references to elements
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/InValidKeyDuplicate.xml?root=Technology_Project&view=markup InValidKeyDuplicate]
<td>InValidKeyDuplicate</td>
+
| Verify that a model with a key constraint is invalid if the field values are not unique.
<td>identity\InValidKeyDuplicate.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/InValidKeyDuplicate.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Verify that a model with a key constraint is invalid if the field values are not unique.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/InValidKeyMissing.xml?root=Technology_Project&view=markup InValidKeyMissing]
 
+
| Verify that a model with a key constraint is invalid if some field values are missing.
<tr>
+
| .
<td>InValidKeyMissing</td>
+
|-
<td>identity\InValidKeyMissing.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/InValidKeyMissing.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/InValidUnique.xml?root=Technology_Project&view=markup InValidUnique]
<td>Verify that a model with a key constraint is invalid if some field values are missing.</td>
+
| Verify that a model with a unique constraint is invalid if the field values are not unique.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintDefinition.xml?root=Technology_Project&view=markup InvalidConstraintDefinition]
<td>InValidUnique</td>
+
| This test returns a warning when the id constraints are defined on a complexType. They should be defined on an element declaration.
<td>identity\InValidUnique.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/InValidUnique.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Verify that a model with a unique constraint is invalid if the field values are not unique.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefAttributes.xml?root=Technology_Project&view=markup InvalidConstraintRefAttributes]
 
+
| Verifies that the code returns an error when the name attribute is specified on a constraint with the ref attribute specified. Ref attribute I am referring to here is the one defined on the keybase type. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: 1.The name attribute MUST NOT be specified.
<tr>
+
| .
<td>InvalidConstraintDefinition</td>
+
|-
<td>identity\sml1.1\InValidConstraintDefinition.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintDefinition.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefElements.xml?root=Technology_Project&view=markup InvalidConstraintRefElements]
<td>This test returns a warning when the id constraints are defined on a complexType. They should be defined on an element declaration.</td>
+
| Verifies that the code returns an error when the sml:field and sml:selector child elements are defined on a constraint with the ref attribute specified. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: 2.The sml:selector and sml:field child elements MUST NOT be specified.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefKey.xml?root=Technology_Project&view=markup InvalidConstraintRefKey]
<td>InvalidConstraintRefAttributes</td>
+
| Verifies that the code returns an error when the key's ref attribute value resolves to an element which is not a key.
<td>identity\sml1.1\InValidConstraintRefAttributes.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefAttributes.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Verifies that the code returns an error when the name attribute is specified on a constraint with the ref attribute specified. Ref attribute I am referring to here is the one defined on the keybase type. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: 1.The name attribute MUST NOT be specified.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefKeyref.xml?root=Technology_Project&view=markup InvalidConstraintRefKeyref]
 
+
| Verifies that the code returns an error when the keyref's ref attribute value resolves to a key element instead of a keyref element. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint [..]
<tr>
+
| .
<td>InvalidConstraintRefElements</td>
+
|-
<td>identity\sml1.1\InValidConstraintRefElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefElements.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefNoKey.xml?root=Technology_Project&view=markup InvalidConstraintRefNoKey]
<td>Verifies that the code returns an error when the sml:field and sml:selector child elements are defined on a constraint with the ref attribute specified. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: 2.The sml:selector and sml:field child elements MUST NOT be specified.</td>
+
| Verifies that the code returns an error when the key's ref attribute value doesn't resolve to an SML key constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If the element is sml:key, then the value of ref attribute MUST resolve to an SML key constraint.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefNoKeyref.xml?root=Technology_Project&view=markup InvalidConstraintRefNoKeyRef]
<td>InvalidConstraintRefKey</td>
+
| Verifies that the code returns an error when the keyref's ref attribute value doesn't resolve to an SML keyref constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint, and the refer attribute MUST NOT be specified.
<td>identity\sml1.1\InValidConstraintRefKey.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefKey.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Verifies that the code returns an error when the key's ref attribute value resolves to an element which is not a key.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefNoUnique.xml?root=Technology_Project&view=markup InvalidConstraintRefNoKeyUnique]
 
+
| Verifies that the code returns an error when the unique's ref attribute value doesn't resolve to an SML unique constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If the element is sml:unique, then the value of the ref attribute MUST resolve to an SML unique constraint.
<tr>
+
| .
<td>InvalidConstraintRefKeyref</td>
+
|-
<td>identity\sml1.1\InValidConstraintRefKeyref.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefKeyref.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefUnique.xml?root=Technology_Project&view=markup InvalidConstraintRefUnique]
<td>Verifies that the code returns an error when the keyref's ref attribute value resolves to a key element instead of a keyref element. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint [..]</td>
+
| Verifies that the code returns an error when the unique's ref attribute value resolves to an element that is not of type sml:unique.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintSubstitution.xml?root=Technology_Project&view=markup InvalidConstraintSubstitution]
<td>InvalidConstraintRefNoKey</td>
+
| This test verifies that substitution group elements validate id constraints defined on their group affiliation. If an element declaration S has a {substitution group affiliation} G, then its {SML identity-constraints definitions} also contains members of {SML identity-constraints definitions} of G.
<td>identity\sml1.1\InValidConstraintRefNoKey.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefNoKey.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Verifies that the code returns an error when the key's ref attribute value doesn't resolve to an SML key constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If the element is sml:key, then the value of ref attribute MUST resolve to an SML key constraint.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidDuplicateConstraintName.xml?root=Technology_Project&view=markup InvalidDuplicateConstraintName]
 
+
| This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration).
<tr>
+
| .
<td>InvalidConstraintRefNoKeyRef</td>
+
|-
<td>identity\sml1.1\InValidConstraintRefNoKeyref.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefNoKeyref.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidDuplicateConstraintName1.xml?root=Technology_Project&view=markup InvalidDuplicateConstraintName1]
<td>Verifies that the code returns an error when the keyref's ref attribute value doesn't resolve to an SML keyref constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint, and the refer attribute MUST NOT be specified.</td>
+
| This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration). The {SML identity-constraints definitions} of an element declaration MUST NOT contain two identity constraints with the same name.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidDuplicateConstraintNameSubst.xml?root=Technology_Project&view=markup InvalidDuplicateConstraintSubst]
<td>InvalidConstraintRefNoKeyUnique</td>
+
| This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration). If a global element declaration S has a {substitution group affiliation} G, then {SML identity-constraints definitions} of S MUST be a superset of that of G.
<td>identity\sml1.1\InValidConstraintRefNoUnique.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefNoUnique.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Verifies that the code returns an error when the unique's ref attribute value doesn't resolve to an SML unique constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If the element is sml:unique, then the value of the ref attribute MUST resolve to an SML unique constraint.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/ValidConstraintRefKeyref.xml?root=Technology_Project&view=markup ValidConstraintRefKeyref]
 
+
| Verifies that the code returns success when the keyref's ref attribute value resolves to a keyref element. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint [..]
<tr>
+
| .
<td>InvalidConstraintRefUnique</td>
+
|-
<td>identity\sml1.1\InValidConstraintRefUnique.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintRefUnique.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/ValidKeyref.xml?root=Technology_Project&view=markup ValidKeyref]
<td>Verifies that the code returns an error when the unique's ref attribute value resolves to an element that is not of type sml:unique.</td>
+
| Verify keyref constraint.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/ValidKeyUnique.xml?root=Technology_Project&view=markup ValidKeyUnique]
<td>InvalidConstraintSubstitution</td>
+
| Verify that a model with a key and unique constraint is valid if the field values are unique, though some field values for the unique constraint may be missing.
<td>identity\sml1.1\InValidConstraintSubstitution.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidConstraintSubstitution.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that substitution group elements validate id constraints defined on their group affiliation. If an element declaration S has a {substitution group affiliation} G, then its {SML identity-constraints definitions} also contains members of {SML identity-constraints definitions} of G.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/ValidKeyUniqueInScopeOnly.xml?root=Technology_Project&view=markup ValidKeyUniqueInScopeOnly]
 
+
| Verify that a model with a key and unique constraint is valid if the constraints are satisfied in scope even though the constraints may not be satisfied globally in the model.
<tr>
+
| .
<td>InvalidDuplicateConstraintName</td>
+
|}
<td>identity\sml1.1\InValidDuplicateConstraintName.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidDuplicateConstraintName.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration).</td>
+
</tr>
+
 
+
<tr>
+
<td>InvalidDuplicateConstraintName1</td>
+
<td>identity\sml1.1\InValidDuplicateConstraintName1.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidDuplicateConstraintName1.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration). The {SML identity-constraints definitions} of an element declaration MUST NOT contain two identity constraints with the same name.</td>
+
</tr>
+
 
+
<tr>
+
<td>InvalidDuplicateConstraintSubst</td>
+
<td>identity\sml1.1\InValidDuplicateConstraintNameSubst.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/InValidDuplicateConstraintNameSubst.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration). If a global element declaration S has a {substitution group affiliation} G, then {SML identity-constraints definitions} of S MUST be a superset of that of G.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidConstraintRefKeyref</td>
+
<td>identity\sml1.1\ValidConstraintRefKeyref.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/sml1.1/ValidConstraintRefKeyref.xml?root=Technology_Project&view=markup src])</td>
+
<td>Verifies that the code returns success when the keyref's ref attribute value resolves to a keyref element. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint [..]</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidKeyref</td>
+
<td>identity\ValidKeyref.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/ValidKeyref.xml?root=Technology_Project&view=markup src])</td>
+
<td>Verify keyref constraint.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidKeyUnique</td>
+
<td>identity\ValidKeyUnique.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/ValidKeyUnique.xml?root=Technology_Project&view=markup src])</td>
+
<td>Verify that a model with a key and unique constraint is valid if the field values are unique, though some field values for the unique constraint may be missing.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidKeyUniqueInScopeOnly</td>
+
<td>identity\ValidKeyUniqueInScopeOnly.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/identity/ValidKeyUniqueInScopeOnly.xml?root=Technology_Project&view=markup src])</td>
+
<td>Verify that a model with a key and unique constraint is valid if the constraints are satisfied in scope even though the constraints may not be satisfied globally in the model.</td>
+
</tr>
+
 
+
</table>
+
 
=== Model Completeness Tests ===
 
=== Model Completeness Tests ===
 
Tests that check for the completeness of the model
 
Tests that check for the completeness of the model
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/incomplete/InValid.xml?root=Technology_Project&view=markup InValidInCompleteModel]
<td>InValidInCompleteModel</td>
+
| This test verifies that an incomplete model is invalid
<td>incomplete\InValid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/incomplete/InValid.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that an incomplete model is invalid</td>
+
|}
</tr>
+
 
+
</table>
+
 
=== Miscellaneous Tests ===
 
=== Miscellaneous Tests ===
 
Tests that check miscellaneous issues to ensure valid SML documents
 
Tests that check miscellaneous issues to ensure valid SML documents
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidAliasValue.xml?root=Technology_Project&view=markup InValidAliasValue]
<td>InValidAliasValue</td>
+
| This test verifies that the code returns an error when an alias contains an invalid value.
<td>others\InValidAliasValue.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidAliasValue.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that the code returns an error when an alias contains an invalid value.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidAliasWithFragment.xml?root=Technology_Project&view=markup InValidAliasHasFragmentComp]
 
+
| This test verifies that the code returns an error when an alias contains a fragment component.
<tr>
+
| .
<td>InValidAliasHasFragmentComp</td>
+
|-
<td>others\InValidAliasWithFragment.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidAliasWithFragment.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidBase64Content.xml?root=Technology_Project&view=markup InvalidBase64Content]
<td>This test verifies that the code returns an error when an alias contains a fragment component.</td>
+
| This test verifies that the code returns an error when a document that is a child of the base64Data element is not encoded in Base64 format.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidDataContentBase64.xml?root=Technology_Project&view=markup InvalidDataContentBase64]
<td>InvalidBase64Content</td>
+
| This test verifies that the code returns an error when a document that is a child of the data element is encoded in base64 format.
<td>others\InValidBase64Content.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidBase64Content.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that the code returns an error when a document that is a child of the base64Data element is not encoded in Base64 format.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidDuplicateAliases.xml?root=Technology_Project&view=markup InValidDuplicateAliases]
 
+
| This test verifies that the code returns an error when two aliases resolve to the same URI
<tr>
+
| .
<td>InvalidDataContentBase64</td>
+
|-
<td>others\InValidDataContentBase64.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidDataContentBase64.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidMultipleDocument.xml?root=Technology_Project&view=markup InvalidMultipleDocument]
<td>This test verifies that the code returns an error when a document that is a child of the data element is encoded in base64 format.</td>
+
| This test verifies that the code returns an error if the data element contains more than one document.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/remote-document.xml?root=Technology_Project&view=markup TestDocumentLocator]
<td>InValidDuplicateAliases</td>
+
| Tests the correct implementation of the locator element
<td>others\InValidDuplicateAliases.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidDuplicateAliases.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that the code returns an error when two aliases resolve to the same URI</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/rulesWithMultiplePattern.xml?root=Technology_Project&view=markup TestRulesWithMultiplePatterns]
 
+
| Tests that rules that have multiple patterns are handled correctly
<tr>
+
| .
<td>InvalidMultipleDocument</td>
+
|-
<td>others\InValidMultipleDocument.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/InValidMultipleDocument.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/rulesWithMultipleRulesUnderOnePattern.xml?root=Technology_Project&view=markup TestMultipleRulesUnderOnePattern]
<td>This test verifies that the code returns an error if the data element contains more than one document.</td>
+
| Tests that patterns with multiple rules are handled correctly
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/SchemaBindingWarning.xml?root=Technology_Project&view=markup ValidateSchemaBinding]
<td>TestDocumentLocator</td>
+
| Used to ensure that a warning is displayed when a schema binding element is used in an SML-IF document
<td>others\remote-document.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/remote-document.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Tests the correct implementation of the locator element</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/schemaValidationFailure.xml?root=Technology_Project&view=markup TestSchemaValidationFailure]
 
+
| Tests that validation against the schema fails.
<tr>
+
| .
<td>TestRulesWithMultiplePatterns</td>
+
|-
<td>others\rulesWithMultiplePattern.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/rulesWithMultiplePattern.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidBase64Content.xml?root=Technology_Project&view=markup ValidBase64Content]
<td>Tests that rules that have multiple patterns are handled correctly</td>
+
| This test verifies that the code returns success when a document that is a child of the base64Data element is encoded in Base64 format.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidDefaultSchemaBinding.xml?root=Technology_Project&view=markup ValidateDefaultSchemaBinding]
<td>TestMultipleRulesUnderOnePattern</td>
+
| This test verifies that the code is using the defaultSchema information to locate the definition file for instance documents not included in schemaBinding. In this sample, the Course1 and Course2 instances should be validated against the University.xsd schema. Course3 will be validated against the Univerity_v1.xsd schema since Course3 is not included in any schemaBinding element.
<td>others\rulesWithMultipleRulesUnderOnePattern.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/rulesWithMultipleRulesUnderOnePattern.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Tests that patterns with multiple rules are handled correctly</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidEmptyDocument.xml?root=Technology_Project&view=markup ValidEmptyDocument]
 
+
| This test verifies that it is valid to have an empty document.
<tr>
+
| .
<td>ValidateSchemaBinding</td>
+
|-
<td>others\SchemaBindingWarning.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/SchemaBindingWarning.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidNoSchemaBinding.xml?root=Technology_Project&view=markup ValidateNoSchemaBinding]
<td>Used to ensure that a warning is displayed when a schema binding element is used in an SML-IF document</td>
+
| If a namespace ns is not included in any schemaBinding or defaultSchema element, then the schema defining this namespace is built by composing all definition documents whose target namespace matches ns. This resulted schema will be used to validate any instance document using ns namespace. The test should return an error on acyclic
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidSchemaBinding.xml?root=Technology_Project&view=markup ValidateSchemaBinding]
<td>TestSchemaValidationFailure</td>
+
| This test verifies that the code is using the schemaBinding information to locate the definition file for instance documents. In this sample, there are two xsd files with the same namespace, tns. The instance documents are bound to the first xsd definition, University.xsd using the schemaBinding element. As a result, the validation should be run using the schema defined in University.xsd and ignore University_v1.xsd. The validation returns success since Univesity.xsd does not have the acyclic attribute specified on the OptionalCourseRefType type. If the schemaBinding is ignored, then the validator should return error ( the schema file used to validate the instances will be composed from both xsd files; the first definition of the OptionalCourseRefType type in the University.xsd will be overwritten by the OptionalCourseRefType - acyclic = true in the University_v1.xsd )
<td>others\schemaValidationFailure.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/schemaValidationFailure.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Tests that validation against the schema fails.</td>
+
|}
</tr>
+
 
+
<tr>
+
<td>ValidBase64Content</td>
+
<td>others\ValidBase64Content.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidBase64Content.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns success when a document that is a child of the base64Data element is encoded in Base64 format.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidateDefaultSchemaBinding</td>
+
<td>others\ValidDefaultSchemaBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidDefaultSchemaBinding.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code is using the defaultSchema information to locate the definition file for instance documents not included in schemaBinding. In this sample, the Course1 and Course2 instances should be validated against the University.xsd schema. Course3 will be validated against the Univerity_v1.xsd schema since Course3 is not included in any schemaBinding element.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidEmptyDocument</td>
+
<td>others\ValidEmptyDocument.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidEmptyDocument.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that it is valid to have an empty document.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidateNoSchemaBinding</td>
+
<td>others\ValidNoSchemaBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidNoSchemaBinding.xml?root=Technology_Project&view=markup src])</td>
+
<td>If a namespace ns is not included in any schemaBinding or defaultSchema element, then the schema defining this namespace is built by composing all definition documents whose target namespace matches ns. This resulted schema will be used to validate any instance document using ns namespace. The test should return an error on acyclic</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidateSchemaBinding</td>
+
<td>others\ValidSchemaBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/others/ValidSchemaBinding.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code is using the schemaBinding information to locate the definition file for instance documents. In this sample, there are two xsd files with the same namespace, tns. The instance documents are bound to the first xsd definition, University.xsd using the schemaBinding element. As a result, the validation should be run using the schema defined in University.xsd and ignore University_v1.xsd. The validation returns success since Univesity.xsd does not have the acyclic attribute specified on the OptionalCourseRefType type. If the schemaBinding is ignored, then the validator should return error ( the schema file used to validate the instances will be composed from both xsd files; the first definition of the OptionalCourseRefType type in the University.xsd will be overwritten by the OptionalCourseRefType - acyclic = true in the University_v1.xsd )</td>
+
</tr>
+
 
+
</table>
+
 
=== Reference Tests ===
 
=== Reference Tests ===
 
Tests that validate the implementation of <code>sml:ref</code>
 
Tests that validate the implementation of <code>sml:ref</code>
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/InvalidRefOneSchemeResolves.xml?root=Technology_Project&view=markup InvalidRefOneSchemeResolves]
<td>InvalidRefOneSchemeResolves</td>
+
| An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns an error when an SML references contains two reference scheme, resolving to two different elements.
<td>references\ConsistentReferences\InvalidRefOneSchemeResolves.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/InvalidRefOneSchemeResolves.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns an error when an SML references contains two reference scheme, resolving to two different elements.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/InvalidRefResolvesToMultipleElements.xml?root=Technology_Project&view=markup InvalidRefResolvesToMultipleElements]
 
+
| Every non-null reference MUST target at most one element in a model. When a recognized scheme in a reference resolves to more than one target then the model MUST be declared invalid. This test verifies that the code returns an error when an SML references contains a reference scheme that resolves to more than one element.
<tr>
+
| .
<td>InvalidRefResolvesToMultipleElements</td>
+
|-
<td>references\ConsistentReferences\InvalidRefResolvesToMultipleElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/InvalidRefResolvesToMultipleElements.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/InvalidRefTwoSchemes.xml?root=Technology_Project&view=markup InvalidRefTwoSchemes]
<td>Every non-null reference MUST target at most one element in a model. When a recognized scheme in a reference resolves to more than one target then the model MUST be declared invalid. This test verifies that the code returns an error when an SML references contains a reference scheme that resolves to more than one element.</td>
+
| An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns an error when an SML references contains two reference scheme, and one scheme resolves while the other doesn't.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefNilrefSpecified1.xml?root=Technology_Project&view=markup ValidRefNilrefSpecified1]
<td>InvalidRefTwoSchemes</td>
+
| A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference is to be resolved, the validator will return an exception since the two reference schemes resolve to two different elements. This test should return success because the sml:nilref is specified.
<td>references\ConsistentReferences\InvalidRefTwoSchemes.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/InvalidRefTwoSchemes.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns an error when an SML references contains two reference scheme, and one scheme resolves while the other doesn't.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefOneSchemeResolvesOtherUnknown.xml?root=Technology_Project&view=markup ValidRefOneSchemeResolvesOtherUnknown]
 
+
| An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns success when an SML references contains two reference scheme, one resolving to a valid target and the other scheme being unknown to the processor.
<tr>
+
| .
<td>ValidRefNilrefSpecified1</td>
+
|-
<td>references\ConsistentReferences\ValidRefNilrefSpecified1.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefNilrefSpecified1.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefTwoSchemes.xml?root=Technology_Project&view=markup ValidRefTwoSchemes]
<td>A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference is to be resolved, the validator will return an exception since the two reference schemes resolve to two different elements. This test should return success because the sml:nilref is specified.</td>
+
| An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns success when an SML references contains two reference scheme, both resolving to the same target.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefTwoSchemesNilSpecified.xml?root=Technology_Project&view=markup ValidRefTwoSchemesNilSpecified]
<td>ValidRefOneSchemeResolvesOtherUnknown</td>
+
| A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference below is to be resolved, the validator will return an exception since only one reference scheme resolves. This test should return success because the sml:nilref is specified.
<td>references\ConsistentReferences\ValidRefOneSchemeResolvesOtherUnknown.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefOneSchemeResolvesOtherUnknown.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns success when an SML references contains two reference scheme, one resolving to a valid target and the other scheme being unknown to the processor.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefTwoSchemesReturnsNull.xml?root=Technology_Project&view=markup ValidRefTwoSchemesReturnsNull]
 
+
| A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference below is to be resolved, the validator will return a non null target element. This test should return success but with a reference target of null.
<tr>
+
| .
<td>ValidRefTwoSchemes</td>
+
|-
<td>references\ConsistentReferences\ValidRefTwoSchemes.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefTwoSchemes.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/DanglingRef.xml?root=Technology_Project&view=markup DanglingRef]
<td>An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns success when an SML references contains two reference scheme, both resolving to the same target.</td>
+
| This test verifies that a valid model can contain dangling references
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/EmptyRefElement.xml?root=Technology_Project&view=markup EmptyRefElement]
<td>ValidRefTwoSchemesNilSpecified</td>
+
| This test verifies that reference elements can be empty
<td>references\ConsistentReferences\ValidRefTwoSchemesNilSpecified.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefTwoSchemesNilSpecified.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference below is to be resolved, the validator will return an exception since only one reference scheme resolves. This test should return success because the sml:nilref is specified.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/IntraDocumentRef.xml?root=Technology_Project&view=markup IntraDocumentRef]
 
+
| This test verifies that a reference element can target an element in the same document
<tr>
+
| .
<td>ValidRefTwoSchemesReturnsNull</td>
+
|-
<td>references\ConsistentReferences\ValidRefTwoSchemesReturnsNull.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ConsistentReferences/ValidRefTwoSchemesReturnsNull.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/InValidBaseURI.xml?root=Technology_Project&view=markup InValidBaseURI]
<td>A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference below is to be resolved, the validator will return a non null target element. This test should return success but with a reference target of null.</td>
+
| This test verifies that the code returns an error when the base URI is not an absolute URI
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/InValidBaseURI2.xml?root=Technology_Project&view=markup InValidBaseURIHasFragmentComp]
<td>DanglingRef</td>
+
| This test verifies that the code returns an error when the base URI contains a fragment component.
<td>references\DanglingRef.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/DanglingRef.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that a valid model can contain dangling references</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/InValidMissingBaseURIAttr.xml?root=Technology_Project&view=markup InValidMissingBaseURIAttr1]
 
+
| This test verifies that the code returns an error when there is relative reference in a document and the baseURI is not defined.
<tr>
+
| .
<td>EmptyRefElement</td>
+
|-
<td>references\EmptyRefElement.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/EmptyRefElement.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/InvalidSmlRefValue.xml?root=Technology_Project&view=markup InvalidSmlRefValue]
<td>This test verifies that reference elements can be empty</td>
+
| This test verifies that valid values are used for sml:ref attribute
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/MultipleRefToAnElement.xml?root=Technology_Project&view=markup MultipleRefToAnElement]
<td>IntraDocumentRef</td>
+
| This test verifies that an element can be targeted by multiple different references
<td>references\IntraDocumentRef.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/IntraDocumentRef.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that a reference element can target an element in the same document</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/NullRefElement.xml?root=Technology_Project&view=markup NullRefElement]
 
+
| This test verifies that reference elements can be null
<tr>
+
| .
<td>InValidBaseURI</td>
+
|-
<td>references\InValidBaseURI.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/InValidBaseURI.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/NullReferences/InvalidNilRefDefinition.xml?root=Technology_Project&view=markup InvalidNillRefDefinition]
<td>This test verifies that the code returns an error when the base URI is not an absolute URI</td>
+
| This test verifies that sml:nilref attribute is only defined on instance elements with sml:ref="true" specified. This global attribute is used to identify null reference elements. This attribute MUST NOT be used on an element unless it also has sml:ref="true" specified.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/NullReferences/ValidNilRefDefinition.xml?root=Technology_Project&view=markup InvalidNillRefDefinition]
<td>InValidBaseURIHasFragmentComp</td>
+
| This test verifies that sml:nilref attribute can only be defined on instance elements with sml:ref="true" specified. This global attribute is used to identify null reference elements. This attribute MUST NOT be used on an element unless it also has sml:ref="true" specified.
<td>references\InValidBaseURI2.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/InValidBaseURI2.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that the code returns an error when the base URI contains a fragment component.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/RefToNonRootElement.xml?root=Technology_Project&view=markup RefToNonRootElement]
 
+
| This test verifies that a reference element in a document can target non-root elements in some other document
<tr>
+
| .
<td>InValidMissingBaseURIAttr1</td>
+
|-
<td>references\InValidMissingBaseURIAttr.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/InValidMissingBaseURIAttr.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/RefToRootElement.xml?root=Technology_Project&view=markup RefToRootElement]
<td>This test verifies that the code returns an error when there is relative reference in a document and the baseURI is not defined.</td>
+
| This test verifies that a reference element in a document can target the root element in some other document
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeDerefUsed.xml?root=Technology_Project&view=markup InvalidSchemeDerefUsed]
<td>MultipleRefToAnElement</td>
+
| This test verifies that the code returns error when an smlxpath1 scheme contains a deref() in the evaluator. The deref() XPath extension function MUST NOT be present in the expression evaluation context function library when processing the location path in SMLXPath1_SchemeData : SMLXPath1_Fragment_ID ::= 'smlxpath1' '(' SMLXPath1_SchemeData ')' SMLXPath1_SchemeData ::= XPath1.0_LocationPath
<td>references\MultipleRefToAnElement.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/MultipleRefToAnElement.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that an element can be targeted by multiple different references</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeNamespaceUnknown.xml?root=Technology_Project&view=markup InvalidSchemeNamespaceUnknown]
 
+
| This test verifies that the code returns error when an smlxpath1 scheme uses a namespace not defined in the containing element. Namespace Binding Context: The smlxpath1() scheme inherits the set of namespace bindings available to the containing element.
<tr>
+
| .
<td>NullRefElement</td>
+
|-
<td>references\NullRefElement.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/NullRefElement.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeResultContainsNonElements.xml?root=Technology_Project&view=markup InvalidSchemeResultContainsNonElements]
<td>This test verifies that reference elements can be null</td>
+
| This test verifies that the code returns error when an smlxpath1 scheme resolves to a set containing non-elements. The element(s) targeted by a scheme instance are obtained by applying the location path in SMLXPath1_SchemeData to the root element of the document in the document context. The result MUST be a set of elements. The set MAY be empty. If the result of applying the location path is something other than a set of elements, then the XPointer result is an error.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeSyntaxError.xml?root=Technology_Project&view=markup InvalidSchemeSyntaxError]
<td>InvalidNillRefDefinition</td>
+
| This test verifies that the code returns error when an smlxpath1 location path has an invalid syntax.
<td>references\NullReferences\InvalidNilRefDefinition.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/NullReferences/InvalidNilRefDefinition.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that sml:nilref attribute is only defined on instance elements with sml:ref="true" specified. This global attribute is used to identify null reference elements. This attribute MUST NOT be used on an element unless it also has sml:ref="true" specified.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/ValidSchemeNamespaceInherited.xml?root=Technology_Project&view=markup ValidSchemeNamespaceInherited]
 
+
| This test verifies that the code returns success when an smlxpath1 scheme uses a namespace defined by the containing element. Namespace Binding Context: The smlxpath1() scheme inherits the set of namespace bindings available to the containing element.
<tr>
+
| .
<td>InvalidNillRefDefinition</td>
+
|-
<td>references\NullReferences\ValidNilRefDefinition.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/NullReferences/ValidNilRefDefinition.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ValidBaseURIAttr1.xml?root=Technology_Project&view=markup ValidMissingBaseURIAttr1]
<td>This test verifies that sml:nilref attribute can only be defined on instance elements with sml:ref="true" specified. This global attribute is used to identify null reference elements. This attribute MUST NOT be used on an element unless it also has sml:ref="true" specified.</td>
+
| This test verifies that it is valid to not define the baseURI when there is no relative URI defined within any document.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ValidBaseURIAttr2.xml?root=Technology_Project&view=markup ValidMissingBaseURIAttr2]
<td>RefToNonRootElement</td>
+
| This test verifies that it is valid to have no baseURI, no aliases and a relative reference in a document, if the reference contains only a fragment component. In which case the reference points to an element within the same document.
<td>references\RefToNonRootElement.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/RefToNonRootElement.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test verifies that a reference element in a document can target non-root elements in some other document</td>
+
|}
</tr>
+
 
+
<tr>
+
<td>RefToRootElement</td>
+
<td>references\RefToRootElement.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/RefToRootElement.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that a reference element in a document can target the root element in some other document</td>
+
</tr>
+
 
+
<tr>
+
<td>InvalidSchemeDerefUsed</td>
+
<td>references\smlxpath1Scheme\InvalidSchemeDerefUsed.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeDerefUsed.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns error when an smlxpath1 scheme contains a deref() in the evaluator. The deref() XPath extension function MUST NOT be present in the expression evaluation context function library when processing the location path in SMLXPath1_SchemeData : SMLXPath1_Fragment_ID ::= 'smlxpath1' '(' SMLXPath1_SchemeData ')' SMLXPath1_SchemeData ::= XPath1.0_LocationPath</td>
+
</tr>
+
 
+
<tr>
+
<td>InvalidSchemeNamespaceUnknown</td>
+
<td>references\smlxpath1Scheme\InvalidSchemeNamespaceUnknown.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeNamespaceUnknown.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns error when an smlxpath1 scheme uses a namespace not defined in the containing element. Namespace Binding Context: The smlxpath1() scheme inherits the set of namespace bindings available to the containing element.</td>
+
</tr>
+
 
+
<tr>
+
<td>InvalidSchemeResultContainsNonElements</td>
+
<td>references\smlxpath1Scheme\InvalidSchemeResultContainsNonElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeResultContainsNonElements.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns error when an smlxpath1 scheme resolves to a set containing non-elements. The element(s) targeted by a scheme instance are obtained by applying the location path in SMLXPath1_SchemeData to the root element of the document in the document context. The result MUST be a set of elements. The set MAY be empty. If the result of applying the location path is something other than a set of elements, then the XPointer result is an error.</td>
+
</tr>
+
 
+
<tr>
+
<td>InvalidSchemeSyntaxError</td>
+
<td>references\smlxpath1Scheme\InvalidSchemeSyntaxError.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/InvalidSchemeSyntaxError.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns error when an smlxpath1 location path has an invalid syntax.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidSchemeNamespaceInherited</td>
+
<td>references\smlxpath1Scheme\ValidSchemeNamespaceInherited.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/smlxpath1Scheme/ValidSchemeNamespaceInherited.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that the code returns success when an smlxpath1 scheme uses a namespace defined by the containing element. Namespace Binding Context: The smlxpath1() scheme inherits the set of namespace bindings available to the containing element.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidMissingBaseURIAttr1</td>
+
<td>references\ValidBaseURIAttr1.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ValidBaseURIAttr1.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that it is valid to not define the baseURI when there is no relative URI defined within any document.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidMissingBaseURIAttr2</td>
+
<td>references\ValidBaseURIAttr2.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/references/ValidBaseURIAttr2.xml?root=Technology_Project&view=markup src])</td>
+
<td>This test verifies that it is valid to have no baseURI, no aliases and a relative reference in a document, if the reference contains only a fragment component. In which case the reference points to an element within the same document.</td>
+
</tr>
+
 
+
</table>
+
 
=== Rule Tests ===
 
=== Rule Tests ===
 
Tests that ensure that Schematron rules and rule bindings are correctly handled
 
Tests that ensure that Schematron rules and rule bindings are correctly handled
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValid.xml?root=Technology_Project&view=markup InValidSchematronRule]
<td>InValidSchematronRule</td>
+
| A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule.
<td>Rules\InValid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValid.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InvalidLocidEnglish.xml?root=Technology_Project&view=markup InValidSchematronRule]
 
+
| A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. Error message will be taken from the English resource bundle.
<tr>
+
| .
<td>InValidRuleBinding-MultipleRulesSameDocument</td>
+
|-
<td>Rules\InValidRuleBinding-MultipleRulesSameDocument-BothFail.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding-MultipleRulesSameDocument-BothFail.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InvalidLocidGerman.xml?root=Technology_Project&view=markup InValidSchematronRule]
<td>Two rules are bound to the same document - both fail.</td>
+
| A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. Error message will be taken from the German resource bundle.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InvalidLocidMissingBundle.xml?root=Technology_Project&view=markup InValidSchematronRule]
<td>InValidRuleBinding-MultipleRulesSameDocument</td>
+
| A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. locid indicates the locale of the error message to be French, but since French resource bundle doesn't exist, we expect the error message to be taken from the English resource bundle (the default locale).
<td>Rules\InValidRuleBinding-MultipleRulesSameDocument.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding-MultipleRulesSameDocument.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Two rules are bound to the same document. One passes, one fails.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InvalidLocidMissingBundlePackage.xml?root=Technology_Project&view=markup InValidSchematronRule]
 
+
| A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. locid indicates the locale of the error message to be French, but since French resource bundle doesn't exist, we expect the error message to be taken from the English resource bundle (the default locale).
<tr>
+
| .
<td>InValidRuleBinding</td>
+
|-
<td>Rules\InValidRuleBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InvalidLocidMissingKey.xml?root=Technology_Project&view=markup InValidSchematronRule]
<td>A model with a Schematron rule that is bound to some instance documents is invalid if the rule is not satisfied by some bound documents.</td>
+
| A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. locid is specified in a schematron to get a message from the English resource bundle. However, since the key "abc" does not exist in the resource bundle, the text in the schematron is used.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding-MultipleRulesSameDocument-BothFail.xml?root=Technology_Project&view=markup InValidRuleBinding-MultipleRulesSameDocument]
<td>InValidRuleType</td>
+
| Two rules are bound to the same document - both fail.
<td>Rules\InValidRuleType.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleType.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type doesn't satisfy the rule.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding-MultipleRulesSameDocument.xml?root=Technology_Project&view=markup InValidRuleBinding-MultipleRulesSameDocument]
 
+
| Two rules are bound to the same document. One passes, one fails.
<tr>
+
| .
<td>InValidRuleTypeExtension</td>
+
|-
<td>Rules\InValidRuleTypeExtension.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleTypeExtension.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding.xml?root=Technology_Project&view=markup InValidRuleBinding]
<td>A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type or a type derived from CT ( derivation by extension ) doesn't satisfy the rule.</td>
+
| A model with a Schematron rule that is bound to some instance documents is invalid if the rule is not satisfied by some bound documents.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleType.xml?root=Technology_Project&view=markup InValidRuleType]
<td>InValidRuleTypeRestriction</td>
+
| A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type doesn't satisfy the rule.
<td>Rules\InValidRuleTypeRestriction.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleTypeRestriction.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type or a type derived from CT ( derivation by restriction ) doesn't satisfy the rule.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleTypeExtension.xml?root=Technology_Project&view=markup InValidRuleTypeExtension]
 
+
| A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type or a type derived from CT ( derivation by extension ) doesn't satisfy the rule.
<tr>
+
| .
<td>ValidSchematronRule</td>
+
|-
<td>Rules\Valid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/Valid.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleTypeRestriction.xml?root=Technology_Project&view=markup InValidRuleTypeRestriction]
<td>A model with a Schematron rule defined for an element is valid if all instances of the element satisfy the rule.</td>
+
| A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type or a type derived from CT ( derivation by restriction ) doesn't satisfy the rule.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/Valid.xml?root=Technology_Project&view=markup ValidSchematronRule]
<td>ValidXMLSchema</td>
+
| A model with a Schematron rule defined for an element is valid if all instances of the element satisfy the rule.
<td>Rules\ValidNoSML.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/ValidNoSML.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Basic XML Schema file, no SML extensions used.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/ValidNoSML.xml?root=Technology_Project&view=markup ValidXMLSchema]
 
+
| Basic XML Schema file, no SML extensions used.
<tr>
+
| .
<td>ValidRuleBinding</td>
+
|-
<td>Rules\ValidRuleBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/ValidRuleBinding.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/ValidRuleBinding.xml?root=Technology_Project&view=markup ValidRuleBinding]
<td>A model with a Schematron rule that is bound to some instance documents is valid if the rule is satisfied by all bound documents.</td>
+
| A model with a Schematron rule that is bound to some instance documents is valid if the rule is satisfied by all bound documents.
</tr>
+
| .
 
+
|}
</table>
+
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/DefaultBinding.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| Schema binding with a default binding
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/InvalidDefaultBinding.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. The default binding is used to bind S2 with I1, I2, and I3
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/InvalidMissingBindingAlias.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| This SML-IF document attempts to bind S1 to dangling instance documents. It also attempts to bind the instance documents to a dangling definition document.
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/InvalidMultipleBinding.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. Schema binding is used to describe both validation sets
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/InvalidMultipleSchemaBinding.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| This SML-IF document attempts to bind S1 to dangling instance documents. It also attempts to bind the instance documents to a dangling definition document.
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/InvalidSchemaBinding.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. Schema binding is used to describe the latter.
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/MissingDocumentAlias.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| Schema binding with a missing document alias
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/MultipleBinding.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| Schema binding with multiple bindings
 +
| .
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/schemaBinding/ValidSchemaBinding.xml?root=Technology_Project&view=markup NoSchemaBinding]
 +
| This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. Schema binding is used to describe the former.
 +
| .
 
=== Target Element Tests ===
 
=== Target Element Tests ===
 
Tests that ensure correct implementation of <code>targetElement</code>
 
Tests that ensure correct implementation of <code>targetElement</code>
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValid.xml?root=Technology_Project&view=markup InValidTargetElement]
<td>InValidTargetElement</td>
+
| If targetElement=?GTE? for a global element declaration E, then a model is invalid if the target of some instance of E in the model is not an instance of GTE.
<td>targetElement\InValid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValid.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If targetElement=?GTE? for a global element declaration E, then a model is invalid if the target of some instance of E in the model is not an instance of GTE.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValidDerivationByRestriction.xml?root=Technology_Project&view=markup InValidDerivationByRestriction]
 
+
| If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then{target element} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {targetElement} as the EnrolledCourse element contained by the StudentType.
<tr>
+
| .
<td>InValidDerivationByRestriction</td>
+
|-
<td>targetElement\InValidDerivationByRestriction.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValidDerivationByRestriction.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValidSameNameElements.xml?root=Technology_Project&view=markup InValidSameNameElements]
<td>If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then{target element} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {targetElement} as the EnrolledCourse element contained by the StudentType.</td>
+
| If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {targetElement}.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InvalidValue.xml?root=Technology_Project&view=markup ValidateTargetElementExists2]
<td>InValidSameNameElements</td>
+
| This test verifies that the value of the sml:targetElement is a global element. Returns an error if the value does not match any element in the corresponding namespace. The test verifies that the error is displayed even when no model instances are defined for this IF document (ie the validation runs against the xsd file containing the sml:targetElement, regardless of the instances being defined in that model)
<td>targetElement\InValidSameNameElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValidSameNameElements.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {targetElement}.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup InValidTargetElementWithSubstitutionGroup]
 
+
| Let targetElement=?GTE? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetElement attribute is not specified. Then a model is invalid if an instance of SubE targets an element that is not an instance of GTE or an instance of some GED in the substitution group hierarchy whose head is GTE.
<tr>
+
| .
<td>ValidateTargetElementExists2</td>
+
|-
<td>targetElement\InvalidValue.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InvalidValue.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/Valid.xml?root=Technology_Project&view=markup ValidTargetElement]
<td>This test verifies that the value of the sml:targetElement is a global element. Returns an error if the value does not match any element in the corresponding namespace. The test verifies that the error is displayed even when no model instances are defined for this IF document (ie the validation runs against the xsd file containing the sml:targetElement, regardless of the instances being defined in that model)</td>
+
| If targetElement=?GTE? for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidateTargetElementDefinition.xml?root=Technology_Project&view=markup ValidateTargetElementDefinition]
<td>InValidTargetElementWithSubstitutionGroup</td>
+
| This test returns a warning if the sml:targetElement attribute is defined on a type definition.
<td>targetElement\InValidWithSubstitutionGroup.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/InValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Let targetElement=?GTE? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetElement attribute is not specified. Then a model is invalid if an instance of SubE targets an element that is not an instance of GTE or an instance of some GED in the substitution group hierarchy whose head is GTE.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidDerivationByRestriction.xml?root=Technology_Project&view=markup ValidDerivationByRestriction]
 
+
| If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then{target element} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {targetElement} as the EnrolledCourse element contained by the StudentType.
<tr>
+
| .
<td>ValidTargetElement</td>
+
|-
<td>targetElement\Valid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/Valid.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidSameNameElements.xml?root=Technology_Project&view=markup ValidSameNameElements]
<td>If targetElement=?GTE? for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.</td>
+
| If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the basicGroup and graduateGroup have the same {targetElement}.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup ValidTargetElementWithSubstitutionGroup]
<td>ValidateTargetElementDefinition</td>
+
| If targetElement=?GTE? for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE
<td>targetElement\ValidateTargetElementDefinition.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidateTargetElementDefinition.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test returns a warning if the sml:targetElement attribute is defined on a type definition.</td>
+
|}
</tr>
+
 
+
<tr>
+
<td>ValidDerivationByRestriction</td>
+
<td>targetElement\ValidDerivationByRestriction.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidDerivationByRestriction.xml?root=Technology_Project&view=markup src])</td>
+
<td>If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then{target element} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {targetElement} as the EnrolledCourse element contained by the StudentType.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidSameNameElements</td>
+
<td>targetElement\ValidSameNameElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidSameNameElements.xml?root=Technology_Project&view=markup src])</td>
+
<td>If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the basicGroup and graduateGroup have the same {targetElement}.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidTargetElementWithSubstitutionGroup</td>
+
<td>targetElement\ValidWithSubstitutionGroup.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetElement/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup src])</td>
+
<td>If targetElement=?GTE? for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE</td>
+
</tr>
+
 
+
</table>
+
 
=== Target Required Tests ===
 
=== Target Required Tests ===
 
Tests that ensure correct validation of <code>sml:targetRequired</code> attribute
 
Tests that ensure correct validation of <code>sml:targetRequired</code> attribute
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValid.xml?root=Technology_Project&view=markup ValidTargetElement]
<td>ValidTargetElement</td>
+
| If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.
<td>targetRequired\InValid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValid.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidDerivationByRestriction.xml?root=Technology_Project&view=markup InValidDerivationByRestriction]
 
+
| If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target required} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {target required} as the EnrolledCourse element contained by the StudentType.
<tr>
+
| .
<td>InValidDerivationByRestriction</td>
+
|-
<td>targetRequired\InValidDerivationByRestriction.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidDerivationByRestriction.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidSameNameElements.xml?root=Technology_Project&view=markup InValidSameNameElements]
<td>If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target required} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {target required} as the EnrolledCourse element contained by the StudentType.</td>
+
| If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {target required}.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidType.xml?root=Technology_Project&view=markup ValidTargetType]
<td>InValidSameNameElements</td>
+
| If targetType=?T? for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T
<td>targetRequired\InValidSameNameElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidSameNameElements.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {target required}.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup ValidTargetElementWithSubstitutionGroup]
 
+
| If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE
<tr>
+
| .
<td>ValidTargetType</td>
+
|-
<td>targetRequired\InValidType.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidType.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/valid.xml?root=Technology_Project&view=markup ValidTargetElement]
<td>If targetType=?T? for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T</td>
+
| If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidateTargetRequiredDefinition.xml?root=Technology_Project&view=markup ValidateTargetRequireDefinition]
<td>ValidTargetElementWithSubstitutionGroup</td>
+
| This test returns a warning if the sml:targetRequired attribute is defined on a type definition.
<td>targetRequired\InValidWithSubstitutionGroup.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/InValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidDerivationByRestriction.xml?root=Technology_Project&view=markup ValidDerivationByRestriction]
 
+
| If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target required} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {target required} as the EnrolledCourse element contained by the StudentType.
<tr>
+
| .
<td>ValidTargetElement</td>
+
|-
<td>targetRequired\valid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/valid.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidFalseRequire.xml?root=Technology_Project&view=markup ValidTargetElement]
<td>If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.</td>
+
| If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidSameNameElements.xml?root=Technology_Project&view=markup ValidSameNameElements]
<td>ValidateTargetRequireDefinition</td>
+
| If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the basicGroup and graduateGroup have the same {target required}.
<td>targetRequired\ValidateTargetRequiredDefinition.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidateTargetRequiredDefinition.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test returns a warning if the sml:targetRequired attribute is defined on a type definition.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidType.xml?root=Technology_Project&view=markup ValidTargetType]
 
+
| If targetType="T" for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T
<tr>
+
| .
<td>ValidDerivationByRestriction</td>
+
|-
<td>targetRequired\ValidDerivationByRestriction.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidDerivationByRestriction.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidTypeFalse.xml?root=Technology_Project&view=markup ValidTargetType]
<td>If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target required} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {target required} as the EnrolledCourse element contained by the StudentType.</td>
+
| If targetType="T" for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup ValidTargetElementWithSubstitutionGroup]
<td>ValidTargetElement</td>
+
| If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE
<td>targetRequired\ValidFalseRequire.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidFalseRequire.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidWithSubstitutionGroupFalseRequire.xml?root=Technology_Project&view=markup ValidTargetElementWithSubstitutionGroup]
 
+
| If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE
<tr>
+
| .
<td>ValidSameNameElements</td>
+
|}
<td>targetRequired\ValidSameNameElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidSameNameElements.xml?root=Technology_Project&view=markup src])</td>
+
<td>If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the basicGroup and graduateGroup have the same {target required}.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidTargetType</td>
+
<td>targetRequired\ValidType.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidType.xml?root=Technology_Project&view=markup src])</td>
+
<td>If targetType="T" for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidTargetType</td>
+
<td>targetRequired\ValidTypeFalse.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidTypeFalse.xml?root=Technology_Project&view=markup src])</td>
+
<td>If targetType="T" for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidTargetElementWithSubstitutionGroup</td>
+
<td>targetRequired\ValidWithSubstitutionGroup.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup src])</td>
+
<td>If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidTargetElementWithSubstitutionGroup</td>
+
<td>targetRequired\ValidWithSubstitutionGroupFalseRequire.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetRequired/ValidWithSubstitutionGroupFalseRequire.xml?root=Technology_Project&view=markup src])</td>
+
<td>If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE</td>
+
</tr>
+
 
+
</table>
+
 
=== Target Type Tests ===
 
=== Target Type Tests ===
 
Tests that ensure correct validation of <code>targetType</code>
 
Tests that ensure correct validation of <code>targetType</code>
  
<table border=1>
+
{|{{BMTableStyle}}
<tr>
+
|-{{BMTHStyle}}
<th>Test Name</th>
+
!Test Name
<th>File</th>
+
!Description
<th>Description</th>
+
!Status
</tr>
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValid.xml?root=Technology_Project&view=markup InValidTargetType]
<td>InValidTargetType</td>
+
| If targetType=?T? for a global element declaration E, then a model is invalid if the type of the target of some instance of E in the model is not T
<td>targetType\InValid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValid.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If targetType=?T? for a global element declaration E, then a model is invalid if the type of the target of some instance of E in the model is not T</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidDerivationByRestriction.xml?root=Technology_Project&view=markup InValidDerivationByRestriction]
 
+
| If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target type} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {targetType} as the EnrolledCourse element contained by the StudentType.
<tr>
+
| .
<td>InValidDerivationByRestriction</td>
+
|-
<td>targetType\InValidDerivationByRestriction.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidDerivationByRestriction.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidSameNameElements.xml?root=Technology_Project&view=markup InValidSameNameElements]
<td>If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target type} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {targetType} as the EnrolledCourse element contained by the StudentType.</td>
+
| If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {target type}.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidValue.xml?root=Technology_Project&view=markup ValidateTargetTypeExists1]
<td>InValidSameNameElements</td>
+
| This test verifies that the value of the sml:targetType resolves to a global type definition. Returns an error if the value does not match any type in the corresponding namespace. The test verifies that the error is displayed even when no model instances are defined for this IF document (ie the validation runs against the xsd file containing the sml:targetType, regardless of the instances being defined in that model)
<td>targetType\InValidSameNameElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidSameNameElements.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {target type}.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup InValidTargetTypeWithSubstitutionGroup]
 
+
| Let targetType=?T? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetType attribute is not specified. Then a model is invalid if an instance of SubE targets an element that is not an instance of T or an instance of some derived type of T.
<tr>
+
| .
<td>ValidateTargetTypeExists1</td>
+
|-
<td>targetType\InValidValue.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidValue.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/Valid.xml?root=Technology_Project&view=markup ValidTargetType]
<td>This test verifies that the value of the sml:targetType resolves to a global type definition. Returns an error if the value does not match any type in the corresponding namespace. The test verifies that the error is displayed even when no model instances are defined for this IF document (ie the validation runs against the xsd file containing the sml:targetType, regardless of the instances being defined in that model)</td>
+
| If targetType=?T? for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidateTargetTypeDefinition.xml?root=Technology_Project&view=markup ValidateTargetTypeDefinition]
<td>InValidTargetTypeWithSubstitutionGroup</td>
+
| This test returns a warning if the sml:targetType attribute is defined on a type definition.
<td>targetType\InValidWithSubstitutionGroup.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/InValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>Let targetType=?T? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetType attribute is not specified. Then a model is invalid if an instance of SubE targets an element that is not an instance of T or an instance of some derived type of T.</td>
+
|-
</tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidDerivationByRestriction.xml?root=Technology_Project&view=markup ValidDerivationByRestriction]
 
+
| If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target type} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {targetType} as the EnrolledCourse element contained by the StudentType.
<tr>
+
| .
<td>ValidTargetType</td>
+
|-
<td>targetType\Valid.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/Valid.xml?root=Technology_Project&view=markup src])</td>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidSameNameElements.xml?root=Technology_Project&view=markup ValidSameNameElements]
<td>If targetType=?T? for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T</td>
+
| If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup have the same {target type}.
</tr>
+
| .
 
+
|-
<tr>
+
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup ValidTargetTypeWithSubstitutionGroup]
<td>ValidateTargetTypeDefinition</td>
+
| Let targetType=?T? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetType attribute is not specified. Then a model is valid if all instances of SubE target elements whose type is T.
<td>targetType\ValidateTargetTypeDefinition.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidateTargetTypeDefinition.xml?root=Technology_Project&view=markup src])</td>
+
| .
<td>This test returns a warning if the sml:targetType attribute is defined on a type definition.</td>
+
|}
</tr>
+
 
+
<tr>
+
<td>ValidDerivationByRestriction</td>
+
<td>targetType\ValidDerivationByRestriction.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidDerivationByRestriction.xml?root=Technology_Project&view=markup src])</td>
+
<td>If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target type} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {targetType} as the EnrolledCourse element contained by the StudentType.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidSameNameElements</td>
+
<td>targetType\ValidSameNameElements.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidSameNameElements.xml?root=Technology_Project&view=markup src])</td>
+
<td>If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup have the same {target type}.</td>
+
</tr>
+
 
+
<tr>
+
<td>ValidTargetTypeWithSubstitutionGroup</td>
+
<td>targetType\ValidWithSubstitutionGroup.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/targetType/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup src])</td>
+
<td>Let targetType=?T? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetType attribute is not specified. Then a model is valid if all instances of SubE target elements whose type is T.</td>
+
</tr>
+
 
+
</table>
+

Revision as of 14:55, 11 August 2008

COSMOS SML and SML-IF Validator Test Plan

Version 1.1, 13 June 2008

Author: David Whiteman

Introduction

The goal of this test plan is to document the test coverage for the SML and SML-IF validator found in the Eclipse COSMOS project. Using this document, we will describe the test suite used to achieve compliance with the SML and SML-IF 1.1 specifications.

The source for these tests can be found in the org.eclipse.cosmos.rm.validation.tests plug-in in CVS.

Test Suite

Acyclic Tests

Tests that check for valid cycles using sml:acyclic

Test Name Description Status
InvalidCyclesWithAcyclicReferences This test verifies that it is an error to create cycles with instances of acyclic references .
InvalidDerivationWithAcyclicAttribute A model is invalid if it has a reference type R1 with sml:acyclic=?true? and another reference type R2 derived from R1 such that sml:acyclic=?false? .
ValidateAcyclicDefinition This test returns a warning if the sml:acyclic attribute is defined on an element declaration .
ValidCyclesWithAcyclicReference1 Let R1 and R2 be two reference types with sml:acyclic=?true?. Then a model is valid if it has inter-document cycles that using instances of both R1 and R2 .
ValidCyclesWithAcyclicReference2 Let R1 be a reference type with sml:acyclic=?false?. Then a model is valid if it has inter-document cycles using instances of R1 .
ValidCycles3 This test verifies that it is valid to create cycles within documents, as long as instances of acyclic references do not create cycles. .
ValidDerivationWithAcyclicAttribute A model is valid if it has a reference type R1 with sml:acyclic=?false? and another reference type R2 derived from R1 such that sml:acyclic=?true? .

Deref Tests

Tests that ensure proper operation of the deref() function

Test Name Description Status
MultipleDeref Verify that deref() can accept a node set of reference elements, i.e., elements for which sml:ref=?true?, and return a node set that is union of the element nodes targeted by references in the node set such that the reference targets exactly one element in the model. The returned node set must not contain any nodes for references that do not target an element in the model. .
MultipleXpointer Verify that deref() can resolve references that target non-root elements using XPointer scheme. .
SingleRef Verify that deref() can resolve a single reference. The deref() function must return a single node (i.e. a node set with a single node) that corresponds to the element node of the reference’s target when the reference targets a single element in the model. .

Identity Tests

Tests that validate the resolution of key references to elements

Test Name Description Status
InValidKeyDuplicate Verify that a model with a key constraint is invalid if the field values are not unique. .
InValidKeyMissing Verify that a model with a key constraint is invalid if some field values are missing. .
InValidUnique Verify that a model with a unique constraint is invalid if the field values are not unique. .
InvalidConstraintDefinition This test returns a warning when the id constraints are defined on a complexType. They should be defined on an element declaration. .
InvalidConstraintRefAttributes Verifies that the code returns an error when the name attribute is specified on a constraint with the ref attribute specified. Ref attribute I am referring to here is the one defined on the keybase type. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: 1.The name attribute MUST NOT be specified. .
InvalidConstraintRefElements Verifies that the code returns an error when the sml:field and sml:selector child elements are defined on a constraint with the ref attribute specified. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: 2.The sml:selector and sml:field child elements MUST NOT be specified. .
InvalidConstraintRefKey Verifies that the code returns an error when the key's ref attribute value resolves to an element which is not a key. .
InvalidConstraintRefKeyref Verifies that the code returns an error when the keyref's ref attribute value resolves to a key element instead of a keyref element. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint [..] .
InvalidConstraintRefNoKey Verifies that the code returns an error when the key's ref attribute value doesn't resolve to an SML key constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If the element is sml:key, then the value of ref attribute MUST resolve to an SML key constraint. .
InvalidConstraintRefNoKeyRef Verifies that the code returns an error when the keyref's ref attribute value doesn't resolve to an SML keyref constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint, and the refer attribute MUST NOT be specified. .
InvalidConstraintRefNoKeyUnique Verifies that the code returns an error when the unique's ref attribute value doesn't resolve to an SML unique constraint. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If the element is sml:unique, then the value of the ref attribute MUST resolve to an SML unique constraint. .
InvalidConstraintRefUnique Verifies that the code returns an error when the unique's ref attribute value resolves to an element that is not of type sml:unique. .
InvalidConstraintSubstitution This test verifies that substitution group elements validate id constraints defined on their group affiliation. If an element declaration S has a {substitution group affiliation} G, then its {SML identity-constraints definitions} also contains members of {SML identity-constraints definitions} of G. .
InvalidDuplicateConstraintName This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration). .
InvalidDuplicateConstraintName1 This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration). The {SML identity-constraints definitions} of an element declaration MUST NOT contain two identity constraints with the same name. .
InvalidDuplicateConstraintSubst This test verifies that the code returns a error when two constraints defined on an element have the same name ( Constraints should have unique names; ie there cannot be an sml:key that has the same name with a sml:key, sml:keyref or sml:unique on the same element declaration). If a global element declaration S has a {substitution group affiliation} G, then {SML identity-constraints definitions} of S MUST be a superset of that of G. .
ValidConstraintRefKeyref Verifies that the code returns success when the keyref's ref attribute value resolves to a keyref element. For each sml:key, sml:unique, or sml:keyref element with the ref attribute specified, {SML identity-constraints definitions} contains the component resolved to by the actual value of the ref attribute, with the following conditions: If element is sml:keyref, then the value of the ref attribute MUST resolve to an SML keyref constraint [..] .
ValidKeyref Verify keyref constraint. .
ValidKeyUnique Verify that a model with a key and unique constraint is valid if the field values are unique, though some field values for the unique constraint may be missing. .
ValidKeyUniqueInScopeOnly Verify that a model with a key and unique constraint is valid if the constraints are satisfied in scope even though the constraints may not be satisfied globally in the model. .

Model Completeness Tests

Tests that check for the completeness of the model

Test Name Description Status
InValidInCompleteModel This test verifies that an incomplete model is invalid .

Miscellaneous Tests

Tests that check miscellaneous issues to ensure valid SML documents

Test Name Description Status
InValidAliasValue This test verifies that the code returns an error when an alias contains an invalid value. .
InValidAliasHasFragmentComp This test verifies that the code returns an error when an alias contains a fragment component. .
InvalidBase64Content This test verifies that the code returns an error when a document that is a child of the base64Data element is not encoded in Base64 format. .
InvalidDataContentBase64 This test verifies that the code returns an error when a document that is a child of the data element is encoded in base64 format. .
InValidDuplicateAliases This test verifies that the code returns an error when two aliases resolve to the same URI .
InvalidMultipleDocument This test verifies that the code returns an error if the data element contains more than one document. .
TestDocumentLocator Tests the correct implementation of the locator element .
TestRulesWithMultiplePatterns Tests that rules that have multiple patterns are handled correctly .
TestMultipleRulesUnderOnePattern Tests that patterns with multiple rules are handled correctly .
ValidateSchemaBinding Used to ensure that a warning is displayed when a schema binding element is used in an SML-IF document .
TestSchemaValidationFailure Tests that validation against the schema fails. .
ValidBase64Content This test verifies that the code returns success when a document that is a child of the base64Data element is encoded in Base64 format. .
ValidateDefaultSchemaBinding This test verifies that the code is using the defaultSchema information to locate the definition file for instance documents not included in schemaBinding. In this sample, the Course1 and Course2 instances should be validated against the University.xsd schema. Course3 will be validated against the Univerity_v1.xsd schema since Course3 is not included in any schemaBinding element. .
ValidEmptyDocument This test verifies that it is valid to have an empty document. .
ValidateNoSchemaBinding If a namespace ns is not included in any schemaBinding or defaultSchema element, then the schema defining this namespace is built by composing all definition documents whose target namespace matches ns. This resulted schema will be used to validate any instance document using ns namespace. The test should return an error on acyclic .
ValidateSchemaBinding This test verifies that the code is using the schemaBinding information to locate the definition file for instance documents. In this sample, there are two xsd files with the same namespace, tns. The instance documents are bound to the first xsd definition, University.xsd using the schemaBinding element. As a result, the validation should be run using the schema defined in University.xsd and ignore University_v1.xsd. The validation returns success since Univesity.xsd does not have the acyclic attribute specified on the OptionalCourseRefType type. If the schemaBinding is ignored, then the validator should return error ( the schema file used to validate the instances will be composed from both xsd files; the first definition of the OptionalCourseRefType type in the University.xsd will be overwritten by the OptionalCourseRefType - acyclic = true in the University_v1.xsd ) .

Reference Tests

Tests that validate the implementation of sml:ref

Test Name Description Status
InvalidRefOneSchemeResolves An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns an error when an SML references contains two reference scheme, resolving to two different elements. .
InvalidRefResolvesToMultipleElements Every non-null reference MUST target at most one element in a model. When a recognized scheme in a reference resolves to more than one target then the model MUST be declared invalid. This test verifies that the code returns an error when an SML references contains a reference scheme that resolves to more than one element. .
InvalidRefTwoSchemes An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns an error when an SML references contains two reference scheme, and one scheme resolves while the other doesn't. .
ValidRefNilrefSpecified1 A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference is to be resolved, the validator will return an exception since the two reference schemes resolve to two different elements. This test should return success because the sml:nilref is specified. .
ValidRefOneSchemeResolvesOtherUnknown An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns success when an SML references contains two reference scheme, one resolving to a valid target and the other scheme being unknown to the processor. .
ValidRefTwoSchemes An SML model MUST be declared invalid when a recognized scheme resolves to a target that's different from the target resolved to by another recognized scheme or when one recognized scheme resolves and another does not. This test verifies that the code returns success when an SML references contains two reference scheme, both resolving to the same target. .
ValidRefTwoSchemesNilSpecified A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference below is to be resolved, the validator will return an exception since only one reference scheme resolves. This test should return success because the sml:nilref is specified. .
ValidRefTwoSchemesReturnsNull A null reference is an explicit declaration of intent by the document author that the reference itself does not exist, and a processing directive (not a hint) to processors not to attempt to recognize any reference schemes in it.If a reference element is recognized as null, then processors MUST NOT attempt to resolve it. The question of whether a null reference is resolved or not is undefined; it is an ill-formed question. This test verifies that the validator does not try to resolve a reference that is marked as null. If the reference below is to be resolved, the validator will return a non null target element. This test should return success but with a reference target of null. .
DanglingRef This test verifies that a valid model can contain dangling references .
EmptyRefElement This test verifies that reference elements can be empty .
IntraDocumentRef This test verifies that a reference element can target an element in the same document .
InValidBaseURI This test verifies that the code returns an error when the base URI is not an absolute URI .
InValidBaseURIHasFragmentComp This test verifies that the code returns an error when the base URI contains a fragment component. .
InValidMissingBaseURIAttr1 This test verifies that the code returns an error when there is relative reference in a document and the baseURI is not defined. .
InvalidSmlRefValue This test verifies that valid values are used for sml:ref attribute .
MultipleRefToAnElement This test verifies that an element can be targeted by multiple different references .
NullRefElement This test verifies that reference elements can be null .
InvalidNillRefDefinition This test verifies that sml:nilref attribute is only defined on instance elements with sml:ref="true" specified. This global attribute is used to identify null reference elements. This attribute MUST NOT be used on an element unless it also has sml:ref="true" specified. .
InvalidNillRefDefinition This test verifies that sml:nilref attribute can only be defined on instance elements with sml:ref="true" specified. This global attribute is used to identify null reference elements. This attribute MUST NOT be used on an element unless it also has sml:ref="true" specified. .
RefToNonRootElement This test verifies that a reference element in a document can target non-root elements in some other document .
RefToRootElement This test verifies that a reference element in a document can target the root element in some other document .
InvalidSchemeDerefUsed This test verifies that the code returns error when an smlxpath1 scheme contains a deref() in the evaluator. The deref() XPath extension function MUST NOT be present in the expression evaluation context function library when processing the location path in SMLXPath1_SchemeData : SMLXPath1_Fragment_ID ::= 'smlxpath1' '(' SMLXPath1_SchemeData ')' SMLXPath1_SchemeData ::= XPath1.0_LocationPath .
InvalidSchemeNamespaceUnknown This test verifies that the code returns error when an smlxpath1 scheme uses a namespace not defined in the containing element. Namespace Binding Context: The smlxpath1() scheme inherits the set of namespace bindings available to the containing element. .
InvalidSchemeResultContainsNonElements This test verifies that the code returns error when an smlxpath1 scheme resolves to a set containing non-elements. The element(s) targeted by a scheme instance are obtained by applying the location path in SMLXPath1_SchemeData to the root element of the document in the document context. The result MUST be a set of elements. The set MAY be empty. If the result of applying the location path is something other than a set of elements, then the XPointer result is an error. .
InvalidSchemeSyntaxError This test verifies that the code returns error when an smlxpath1 location path has an invalid syntax. .
ValidSchemeNamespaceInherited This test verifies that the code returns success when an smlxpath1 scheme uses a namespace defined by the containing element. Namespace Binding Context: The smlxpath1() scheme inherits the set of namespace bindings available to the containing element. .
ValidMissingBaseURIAttr1 This test verifies that it is valid to not define the baseURI when there is no relative URI defined within any document. .
ValidMissingBaseURIAttr2 This test verifies that it is valid to have no baseURI, no aliases and a relative reference in a document, if the reference contains only a fragment component. In which case the reference points to an element within the same document. .

Rule Tests

Tests that ensure that Schematron rules and rule bindings are correctly handled

Test Name Description Status
InValidSchematronRule A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. .
InValidSchematronRule A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. Error message will be taken from the English resource bundle. .
InValidSchematronRule A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. Error message will be taken from the German resource bundle. .
InValidSchematronRule A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. locid indicates the locale of the error message to be French, but since French resource bundle doesn't exist, we expect the error message to be taken from the English resource bundle (the default locale). .
InValidSchematronRule A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. locid indicates the locale of the error message to be French, but since French resource bundle doesn't exist, we expect the error message to be taken from the English resource bundle (the default locale). .
InValidSchematronRule A model with a Schematron rule defined for an element is invalid if at least one instances of the element does not satisfy the rule. locid is specified in a schematron to get a message from the English resource bundle. However, since the key "abc" does not exist in the resource bundle, the text in the schematron is used. .
InValidRuleBinding-MultipleRulesSameDocument Two rules are bound to the same document - both fail. .
InValidRuleBinding-MultipleRulesSameDocument Two rules are bound to the same document. One passes, one fails. .
InValidRuleBinding A model with a Schematron rule that is bound to some instance documents is invalid if the rule is not satisfied by some bound documents. .
InValidRuleType A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type doesn't satisfy the rule. .
InValidRuleTypeExtension A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type or a type derived from CT ( derivation by extension ) doesn't satisfy the rule. .
InValidRuleTypeRestriction A model with a Schematron rule defined for a type CT is invalid if at least one instance element of CT type or a type derived from CT ( derivation by restriction ) doesn't satisfy the rule. .
ValidSchematronRule A model with a Schematron rule defined for an element is valid if all instances of the element satisfy the rule. .
ValidXMLSchema Basic XML Schema file, no SML extensions used. .
ValidRuleBinding A model with a Schematron rule that is bound to some instance documents is valid if the rule is satisfied by all bound documents. .

|- | NoSchemaBinding | Schema binding with a default binding | . |- | NoSchemaBinding | This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. The default binding is used to bind S2 with I1, I2, and I3 | . |- | NoSchemaBinding | This SML-IF document attempts to bind S1 to dangling instance documents. It also attempts to bind the instance documents to a dangling definition document. | . |- | NoSchemaBinding | This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. Schema binding is used to describe both validation sets | . |- | NoSchemaBinding | This SML-IF document attempts to bind S1 to dangling instance documents. It also attempts to bind the instance documents to a dangling definition document. | . |- | NoSchemaBinding | This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. Schema binding is used to describe the latter. | . |- | NoSchemaBinding | Schema binding with a missing document alias | . |- | NoSchemaBinding | Schema binding with multiple bindings | . |- | NoSchemaBinding | This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. Schema binding is used to describe the former. | .

Target Element Tests

Tests that ensure correct implementation of targetElement

Test Name Description Status
InValidTargetElement If targetElement=?GTE? for a global element declaration E, then a model is invalid if the target of some instance of E in the model is not an instance of GTE. .
InValidDerivationByRestriction If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then{target element} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {targetElement} as the EnrolledCourse element contained by the StudentType. .
InValidSameNameElements If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {targetElement}. .
ValidateTargetElementExists2 This test verifies that the value of the sml:targetElement is a global element. Returns an error if the value does not match any element in the corresponding namespace. The test verifies that the error is displayed even when no model instances are defined for this IF document (ie the validation runs against the xsd file containing the sml:targetElement, regardless of the instances being defined in that model) .
InValidTargetElementWithSubstitutionGroup Let targetElement=?GTE? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetElement attribute is not specified. Then a model is invalid if an instance of SubE targets an element that is not an instance of GTE or an instance of some GED in the substitution group hierarchy whose head is GTE. .
ValidTargetElement If targetElement=?GTE? for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE. .
ValidateTargetElementDefinition This test returns a warning if the sml:targetElement attribute is defined on a type definition. .
ValidDerivationByRestriction If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then{target element} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {targetElement} as the EnrolledCourse element contained by the StudentType. .
ValidSameNameElements If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the basicGroup and graduateGroup have the same {targetElement}. .
ValidTargetElementWithSubstitutionGroup If targetElement=?GTE? for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE .

Target Required Tests

Tests that ensure correct validation of sml:targetRequired attribute

Test Name Description Status
ValidTargetElement If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE. .
InValidDerivationByRestriction If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target required} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {target required} as the EnrolledCourse element contained by the StudentType. .
InValidSameNameElements If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {target required}. .
ValidTargetType If targetType=?T? for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T .
ValidTargetElementWithSubstitutionGroup If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE .
ValidTargetElement If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE. .
ValidateTargetRequireDefinition This test returns a warning if the sml:targetRequired attribute is defined on a type definition. .
ValidDerivationByRestriction If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target required} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {target required} as the EnrolledCourse element contained by the StudentType. .
ValidTargetElement If targetElement=GTE for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE. .
ValidSameNameElements If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the basicGroup and graduateGroup have the same {target required}. .
ValidTargetType If targetType="T" for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T .
ValidTargetType If targetType="T" for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T .
ValidTargetElementWithSubstitutionGroup If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE .
ValidTargetElementWithSubstitutionGroup If targetElement="GTE" for a global element declaration E, then a model is valid if the target of each instances of E in the model is an instance of GTE, or an instance of some global element declaration in the substitution group hierarchy whose head is GTE .

Target Type Tests

Tests that ensure correct validation of targetType

Test Name Description Status
InValidTargetType If targetType=?T? for a global element declaration E, then a model is invalid if the type of the target of some instance of E in the model is not T .
InValidDerivationByRestriction If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target type} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType should have the same {targetType} as the EnrolledCourse element contained by the StudentType. .
InValidSameNameElements If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup should have the same {target type}. .
ValidateTargetTypeExists1 This test verifies that the value of the sml:targetType resolves to a global type definition. Returns an error if the value does not match any type in the corresponding namespace. The test verifies that the error is displayed even when no model instances are defined for this IF document (ie the validation runs against the xsd file containing the sml:targetType, regardless of the instances being defined in that model) .
InValidTargetTypeWithSubstitutionGroup Let targetType=?T? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetType attribute is not specified. Then a model is invalid if an instance of SubE targets an element that is not an instance of T or an instance of some derived type of T. .
ValidTargetType If targetType=?T? for a global element declaration E, then a model is valid if the type of the target of each instances of E in the model is T or a derived type of T .
ValidateTargetTypeDefinition This test returns a warning if the sml:targetType attribute is defined on a type definition. .
ValidDerivationByRestriction If the element declaration ED is contained (directly, indirectly, or implicitly) in a content model of a complex type D, who is a restriction of another complex type B and B contains an element declaration EB with the same name as ED, then {target type} of ED is the same as that of EB. In the example below, the EnrolledCourse element contained by the GraduateStudentType has the same {targetType} as the EnrolledCourse element contained by the StudentType. .
ValidSameNameElements If two element declarations E1 and E2 have the same {namespace name} and {name} and they are both contained (directly, indirectly, or implicitly) in a content model of a complex type, then E1 and E2 have the same {target required}, {target element}, and {target type}. In the example below, the two EnrolledCourse elements contained by the StudentType through the graduateGroup and basicGroup have the same {target type}. .
ValidTargetTypeWithSubstitutionGroup Let targetType=?T? be specified for a GED E. Let SubE be another GED in the substitution group whose head element is E for which the targetType attribute is not specified. Then a model is valid if all instances of SubE target elements whose type is T. .

Back to the top