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"

 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
= COSMOS SML and SML-IF Validator Test Plan =
 
= COSMOS SML and SML-IF Validator Test Plan =
  
Version 1.0, 6 March 2008
+
Version 1.4, 21 May 2009
  
Author: David Whiteman
+
Authors: David Whiteman, Ali Mehregani, Hubert Leung, John Arwe
  
 
== Introduction ==
 
== 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 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 [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/?root=Technology_Project <code>org.eclipse.cosmos.rm.validation.tests</code> plug-in in CVS].  The content for the below test plan is generated using the <code>TestPlanGenerator</code> class in that plug-in, using the metadata (i.e. identity data) found in the SML-IF files in <code>test-resources</code>.
  
 
== Test Suite ==
 
== Test Suite ==
  
=== InvalidCyclesWithAcyclicReferences ===
+
=== Acyclic Tests ===
 
+
Tests that check for valid cycles using <code>sml:acyclic</code>
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that it is an error to create cycles with instances of acyclic references
+
 
+
=== InvalidDerivationWithAcyclicAttribute ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test returns a warning if the sml:acyclic attribute is defined on an element declaration
+
 
+
=== ValidCyclesWithAcyclicReference1 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that it is valid to create cycles within documents, as long as instances of acyclic references do not create cycles.
+
 
+
=== ValidDerivationWithAcyclicAttribute ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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”
+
 
+
=== MultipleDeref ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Verify that deref() can resolve references that target non-root elements using XPointer scheme.
+
 
+
=== SingleRef ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== InValidKeyDuplicate ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Verify that a model with a key constraint is invalid if the field values are not unique.
+
 
+
=== InValidKeyMissing ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Verify that a model with a key constraint is invalid if some field values are missing.
+
 
+
=== InValidUnique ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Verify that a model with a unique constraint is invalid if the field values are not unique.
+
 
+
=== InvalidConstraintDefinition ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintDefinition.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test returns a warning when the id constraints are defined on a complexType. They should be defined on an element declaration.
+
 
+
=== InvalidConstraintRefAttributes ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefAttributes.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefElements.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefKey.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
Verifies that the code returns an error when the key's ref attribute value resolves to an element which is not a key.
+
 
+
=== InvalidConstraintRefKeyref ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefKeyref.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefNoKey.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefNoKeyref.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefNoUnique.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintRefUnique.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidConstraintSubstitution.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidDuplicateConstraintName.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidDuplicateConstraintName1.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/InValidDuplicateConstraintNameSubst.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
identity\LC\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/LC/ValidConstraintRefKeyref.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Verify keyref constraint.
+
 
+
=== ValidKeyUnique ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== InValidInCompleteModel ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that an incomplete model is invalid
+
 
+
=== InValidInCompleteModel ===
+
 
+
=== TDM synthetic example converted to use SML ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Describes a database hosted on a windows XP operating system
+
 
+
=== TDM synthetic example converted to use SML ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Describes a database hosted on a windows XP operating system
+
 
+
=== ValidSchematronRule ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
A model with a Schematron rule defined for an element is valid if all instances of the element satisfy the rule.
+
 
+
=== InvalidRefOneSchemeResolves ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that a valid model can contain dangling references
+
 
+
=== EmptyRefElement ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that reference elements can be empty
+
 
+
=== IntraDocumentRef ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that a reference element can target an element in the same document
+
 
+
=== MultipleRefToAnElement ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that an element can be targeted by multiple different references
+
 
+
=== NullRefElement ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that reference elements can be null
+
 
+
=== InvalidNillRefDefinition ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that a reference element in a document can target non-root elements in some other document
+
 
+
=== RefToRootElement ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that a reference element in a document can target the root element in some other document
+
 
+
=== InvalidSchemeDerefUsed ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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
+
 
+
=== InvaliSchemeNamespaceUnknown ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns error when an smlxpath1 location path has an invalid syntax.
+
 
+
=== ValiSchemeNamespaceInherited ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== ValiSchemeNamespaceInherited ===
+
 
+
<b>File:</b>
+
references\smlxpath1Scheme\ValidSchemeNamespaceInherited1.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/ValidSchemeNamespaceInherited1.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== InValidSchematronRule ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== InValidRuleBinding-MultipleRulesSameDocument ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Two rules are bound to the same document - both fail.
+
 
+
=== InValidRuleBinding-MultipleRulesSameDocument ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Two rules are bound to the same document. One passes, one fails.
+
 
+
=== InValidRuleBinding ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
A model with a Schematron rule defined for an element is valid if all instances of the element satisfy the rule.
+
 
+
=== ValidXMLSchema ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
Basic XML Schema file, no SML extensions used.
+
 
+
=== ValidRuleBinding ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
A model with a Schematron rule that is bound to some instance documents is valid if the rule is satisfied by all bound documents.
+
 
+
=== InValidAliasHasFragmentComp ===
+
 
+
<b>File:</b>
+
smlif_lc\InValidAliasHasFragmentComp.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InValidAliasHasFragmentComp.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns an error when an alias contains a fragment component.
+
 
+
=== InValidAliasValue ===
+
 
+
<b>File:</b>
+
smlif_lc\InValidAliasValue.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InValidAliasValue.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns an error when an alias contains an invalid value.
+
 
+
=== InvalidBase64Content ===
+
 
+
<b>File:</b>
+
smlif_lc\InvalidBase64Content.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InvalidBase64Content.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== InValidBaseURI ===
+
 
+
<b>File:</b>
+
smlif_lc\InValidBaseURI.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InValidBaseURI.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns an error when the base URI is not an absolute URI
+
 
+
=== InValidBaseURIHasFragmentComp ===
+
 
+
<b>File:</b>
+
smlif_lc\InValidBaseURIHasFragmentComp.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InValidBaseURIHasFragmentComp.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns an error when the base URI contains a fragment component.
+
 
+
=== InvalidDataContentBase64 ===
+
 
+
<b>File:</b>
+
smlif_lc\InvalidDataContentBase64.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InvalidDataContentBase64.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
smlif_lc\InValidDuplicateAliases.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InValidDuplicateAliases.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns an error when two aliases resolve to the same URI
+
 
+
=== InValidMissingBaseURIAttr1 ===
+
 
+
<b>File:</b>
+
smlif_lc\InValidMissingBaseURIAttr.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InValidMissingBaseURIAttr.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns an error when there is relative reference in a document and the baseURI is not defined.
+
 
+
=== InvalidMultipleDocument ===
+
 
+
<b>File:</b>
+
smlif_lc\InValidMultipleDocument.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/InValidMultipleDocument.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns an error if the data element contains more than one document.
+
 
+
=== ValidateDefaultSchemaBinding ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidateDefaultSchemaBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidateDefaultSchemaBinding.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== ValidateNoSchemaBinding ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidateNoSchemaBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidateNoSchemaBinding.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidateSchemaBinding.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidateSchemaBinding.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 )
+
 
+
=== ValidateSchemaBinding ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidateSchemaBinding1.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidateSchemaBinding1.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 )
+
 
+
=== ValidateSchemaBinding ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidateSchemaBinding2.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidateSchemaBinding2.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 )
+
 
+
=== ValidateSchemaBinding ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidateSchemaBinding3.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidateSchemaBinding3.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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 )
+
 
+
=== ValidBase64Content ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidBase64Content.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidBase64Content.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that the code returns success when a document that is a child of the base64Data element is encoded in Base64 format.
+
 
+
=== ValidEmptyDocument ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidEmptyDocument.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidEmptyDocument.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that it is valid to have an empty document.
+
 
+
=== ValidMissingBaseURIAttr1 ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidMissingBaseURIAttr1.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidMissingBaseURIAttr1.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
This test verifies that it is valid to not define the baseURI when there is no relative URI defined within any document.
+
 
+
=== ValidMissingBaseURIAttr2 ===
+
 
+
<b>File:</b>
+
smlif_lc\ValidMissingBaseURIAttr2.xml ([http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/smlif_lc/ValidMissingBaseURIAttr2.xml?root=Technology_Project&view=markup src])
+
 
+
<b>Descripton:</b>
+
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.
+
 
+
=== InValidTargetElement ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test returns a warning if the sml:targetElement attribute is defined on a type definition.
+
 
+
=== ValidDerivationByRestriction ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
This test returns a warning if the sml:targetRequired attribute is defined on a type definition.
+
 
+
=== ValidDerivationByRestriction ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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
+
 
+
=== InValidTargetType ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
 
+
<b>Descripton:</b>
+
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 ===
+
 
+
<b>File:</b>
+
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])
+
  
<b>Descripton:</b>
+
{|{{BMTableStyle}}
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
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/InValidCycle.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
 +
| A model is invalid if an instance of an acyclic type CT references itself.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/InValidCycleAbstract.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
 +
| A model is invalid if instances of an element type CT derived from the abstract acyclic element type CT' form a cycle.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/InValidCycleAnonymous.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
 +
| A model is invalid if instances of the acyclic anonymous type CT form a cycle
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/InValidCycleByExtension.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
 +
| A model is invalid if instances of an acyclic element type CT (or derived types by restriction) create a cycle
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/InValidCycleByRestriction.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
 +
| A model is invalid if instances of an acyclic element type CT (or derived types by restriction) create a cycle
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/InValidCycleSameDoc.xml?root=Technology_Project&view=markup AcyclicInValidCycleSameDoc]
 +
| A model is invalid if an instance of an acyclic type CT references itself, even w/in the same document
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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?
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidateDefinition.xml?root=Technology_Project&view=markup ValidateAcyclicDefinition]
 +
| This test returns a warning if the sml:acyclic attribute is defined on an element declaration
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidCycle.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
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidCycleNoReference.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
 +
| A model is valid if an element instance with sml:acyclic="true" forms a cycle but is not declared to be an SML reference (despite having a valid sml:uri scheme)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidCycleNullReference.xml?root=Technology_Project&view=markup InvalidCyclesWithAcyclicReferences]
 +
| A model is valid if an element instance with sml:acyclic="true" forms a cycle but is declared as a null SML reference (despite having a valid sml:uri scheme)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidCycleSameDoc.xml?root=Technology_Project&view=markup AcyclicValidCycleSameDoc]
 +
| A model is valid if it has same-document cycles using instances of a type with sml:acyclic=?false?.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidCycleVariation.xml?root=Technology_Project&view=markup ValidCycles3]
 +
| This test verifies that it is valid to create cycles within documents, as long as instances of acyclic references do not create cycles.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidDerivation.xml?root=Technology_Project&view=markup 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?
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidMultipleAcyclics.xml?root=Technology_Project&view=markup ValidCyclesWithAcyclicReference1]
 +
| Let R1 and R2 be two reference types with sml:acyclic=?true?. Then a model is valid if it has inter-document cycles using instances of both R1 and R2
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/acyclic/ValidUnresolvedReference.xml?root=Technology_Project&view=markup ValidUnresolvedReference]
 +
| A model is valid if an element instance with sml:acyclic="true" references an unresolved document.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Base 64 Tests ===
 +
Tests the base 64 element of the SML-IF spec
  
=== ValidateTargetTypeDefinition ===
+
{|{{BMTableStyle}}
 +
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64DTDEntity.xml?root=Technology_Project&view=markup Base64DTDEntity]
 +
| This test verifies that the code returns success when a document that is a child of the base64Data element is encoded in Base64 format. The encoded document is an XML document with DTD definition. The DTD has entity definitions that are used in the XML. A schema for the root element is provided, since noSchemaBinding is absent, in order to pass schema validity assessment (which is strict, since a schema containing the built-in components can be constructed). The test case avoids using noSchemaBinding, since the latter is optional, in order to be testable against all implementations.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64DTDInvalidXML.xml?root=Technology_Project&view=markup Base64DTDInvalidXML]
 +
| The encoded document is an XML document with DTD definition. The XML structure is invalid according to the DTD, but since DTD validation is not done by the SML/SML-IF validator, the SML validator should report success. A schema for the root element is provided, since noSchemaBinding is absent, in order to pass schema validity assessment (which is strict, since a schema containing the built-in components can be constructed). The test case avoids using noSchemaBinding, since the latter is optional, in order to be testable against all implementations.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64DTDMissingEntities.xml?root=Technology_Project&view=markup Base64DTDMissingEntities]
 +
| The encoded document is an XML document with DTD definition. The XML uses entities that are not defined in the DTD. The validation should fail because DTD is processed with fatal failure.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64EncodedDoc.xml?root=Technology_Project&view=markup Base64EncodedDoc]
 +
| An instance document is base64 encoded. R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64EncodedDocs.xml?root=Technology_Project&view=markup Base64EncodedDocs]
 +
| All instance documents are base64 encoded. R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64EncodedSchema.xml?root=Technology_Project&view=markup Base64EncodedSchema]
 +
| A schema document is base64 encoded. R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64EncodedSchemaAndDoc.xml?root=Technology_Project&view=markup Base64EncodedSchemaAndDoc]
 +
| Data in both definition and instance sections is base64 encoded (1 of each). R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64EncodedSchemaAndDocs.xml?root=Technology_Project&view=markup Base64EncodedSchemaAndDocs]
 +
| Data in both definition and instance sections is base64 encoded (1 schema + 3 instances). R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64InvalidEncoding.xml?root=Technology_Project&view=markup Base64InvalidEncoding]
 +
| Encoded data in both definition and instance sections is invalid. Based on acyclic test suite test ValidCycles1.xml.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/base64/Base64InvalidSML.xml?root=Technology_Project&view=markup Base64InvalidSML]
 +
| All instance documents in this SML-IF are base64-encoded. The instance documents have a cycle for an acyclic type. The SML-IF should be validated to false.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Deref Tests ===
 +
Tests that ensure proper operation of the <code>deref()</code> function
  
<b>File:</b>
+
{|{{BMTableStyle}}
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])
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/deref/InValidUnrecognizedScheme.xml?root=Technology_Project&view=markup SingleRef]
 +
| Verify a schematron test using a deref function to resolve an unrecognized reference scheme will fail
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/deref/InValidUsageWithScheme.xml?root=Technology_Project&view=markup InvalidSchemeDerefUsed]
 +
| A model is invalid if an smlxpath1 scheme contains a deref() in the evaluator.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/deref/Multiple.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/deref/Single.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/deref/ValidMultipleScheme.xml?root=Technology_Project&view=markup SingleRef]
 +
| Verify a schematron test using a deref function to resolve a reference with multiple schemes passes as long as both schemes resolve to the same element
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Identity Tests ===
 +
Tests that validate the resolution of key references to elements
  
<b>Descripton:</b>
+
{|{{BMTableStyle}}
This test returns a warning if the sml:targetType attribute is defined on a type definition.
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidConstraintGroup.xml?root=Technology_Project&view=markup InvalidConstraintGroup]
 +
| Define sml:key constraints that are INconsistent for identically named elements in the same type. Spec citation: 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 MUST have the same set of {SML identity-constraints definitions}.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidConstraintRefAttributes.xml?root=Technology_Project&view=markup InvalidConstraintRefAttributes]
 +
| A model is invalid if an identity constraint includes both the 'ref' and 'name' attribute
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidConstraintRefElements.xml?root=Technology_Project&view=markup InvalidConstraintRefElements]
 +
| A model is invalid if the sml:field or sml:selector child elements are specified for a referenced identity constraint.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidConstraintRefKey.xml?root=Technology_Project&view=markup InvalidConstraintRefKey]
 +
| A model is invalid if a referenced identity constraint type does not match to what it's resolved to.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidConstraintRefNoKey.xml?root=Technology_Project&view=markup InvalidConstraintRefNoKey]
 +
| A model is invalid if a referenced identity constraint cannot be resolved
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidConstraintSubstitution.xml?root=Technology_Project&view=markup InvalidConstraintSubstitution]
 +
| 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidDuplicateConstraintNameSubst.xml?root=Technology_Project&view=markup InvalidDuplicateConstraintSubst]
 +
| A model is invalid if two constraint names indirectly declared through substitution group have the same name
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidDuplicateKeyConstraintName.xml?root=Technology_Project&view=markup InvalidDuplicateConstraintName1]
 +
| A model is invalid if two constraint names under the same element have the same name
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidKeyDuplicate.xml?root=Technology_Project&view=markup InValidKeyDuplicate]
 +
| Verify that a model with a key constraint is invalid if the field values are not unique.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidUnionConstraintWithSubstitution.xml?root=Technology_Project&view=markup InvalidConstraintSubstitution]
 +
| 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/InValidUnique.xml?root=Technology_Project&view=markup InValidUnique]
 +
| Verify that a model with a unique constraint is invalid if the field values are not unique.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/ValidConstraintRefKeyref.xml?root=Technology_Project&view=markup ValidConstraintRefKeyref]
 +
| A model is valid if a referenced identity constraint is used using the 'ref' attribute.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/ValidKeyref.xml?root=Technology_Project&view=markup ValidKeyref]
 +
| Verify keyref constraint.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/ValidKeyUnique.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/ValidKeyUniqueDeref.xml?root=Technology_Project&view=markup ValidKeyUniqueDeref]
 +
| 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. Copy and tweak based on identity/ValidKeyUnique.xml
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/identity/ValidSmlXSKey.xml?root=Technology_Project&view=markup InValidKeyDuplicate]
 +
| It is not an error if SML identity constraint and XML identity constraint share the same name.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Miscellaneous Tests ===
 +
Tests that check miscellaneous issues to ensure valid SML documents
  
=== ValidDerivationByRestriction ===
+
{|{{BMTableStyle}}
 +
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/others/InValid.xml?root=Technology_Project&view=markup InValidInCompleteModel]
 +
| This test verifies that a referred-to instance document is treated as if it is not part of the interchange model. In this case, by coding a required reference to the missing document's root whose matches an alias.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/others/InValidAliasValue.xml?root=Technology_Project&view=markup InValidAliasValue]
 +
| This test verifies that the code returns an error when an alias contains an invalid value.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/others/InValidMultipleDocument.xml?root=Technology_Project&view=markup InvalidMultipleDocument]
 +
| This test verifies that the code returns an error if the data element contains more than one document.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/others/remote-document.xml?root=Technology_Project&view=markup TestDocumentLocator]
 +
| Tests the correct implementation of the locator element
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/others/rulesWithMultiplePattern.xml?root=Technology_Project&view=markup TestRulesWithMultiplePatterns]
 +
| Tests that rules that have multiple patterns are handled correctly
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/others/rulesWithMultipleRulesUnderOnePattern.xml?root=Technology_Project&view=markup TestMultipleRulesUnderOnePattern]
 +
| Tests that patterns with multiple rules are handled correctly
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/others/schemaValidationFailure.xml?root=Technology_Project&view=markup TestSchemaValidationFailure]
 +
| Tests that validation against the schema fails.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Reference Tests ===
 +
Tests that validate the implementation of <code>sml:ref</code>
  
<b>File:</b>
+
{|{{BMTableStyle}}
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])
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/DanglingRef.xml?root=Technology_Project&view=markup UnresolvedRef]
 +
| A valid model can contain unresolved references
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/IntraDocumentRef.xml?root=Technology_Project&view=markup IntraDocumentRef]
 +
| It is valid for a reference to target an element in the same document.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InvalidBareNameDangling.xml?root=Technology_Project&view=markup InvalidBareNameUnresolved]
 +
| This SML-IF contains an SML reference that is a unresolved reference. Bare name is used in this reference.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InvalidBareNameMultipleSchemes.xml?root=Technology_Project&view=markup InvalidBareNameMultipleSchemes]
 +
| An SML reference in this SML-IF document contains 2 references, one uses bare name and one uses smlxpath1. These two references don't resolve to the same element. It is an error as the SML reference is inconsistent.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidBaseURI.xml?root=Technology_Project&view=markup InValidBaseURI]
 +
| A model is invalid if base URI is not valid
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidBaseURIRelative.xml?root=Technology_Project&view=markup InValidBaseURIRelative]
 +
| A model is invalid if the base URI is not absolute and the model contains a relative reference
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidBaseURIWithFragment.xml?root=Technology_Project&view=markup InValidBaseURIHasFragmentComp]
 +
| A model is invalid if the base URI contains a fragment
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidDanglingReference.xml?root=Technology_Project&view=markup InvalidRefTwoSchemes]
 +
| A model is invalid if it contains a reference with two schemes, one resolving to an element and the other unresolved
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidInconsistentReference.xml?root=Technology_Project&view=markup InvalidRefOneSchemeResolves]
 +
| A model is invalid if a reference contains multiple schemes resolving to different elements.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidMissingBaseURI.xml?root=Technology_Project&view=markup InValidMissingBaseURIAttr1]
 +
| A model is invalid if a reference is relative and the base URI is missing
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidMultipleElements.xml?root=Technology_Project&view=markup InvalidRefResolvesToMultipleElements]
 +
| A model is invalid if a reference scheme resolves to multiple elements
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidMultipleElementsVariation.xml?root=Technology_Project&view=markup InvalidRefResolvesToMultipleElements]
 +
| A model is invalid if a reference element is identified with sml:ref="1" and its scheme resolves to multiple elements
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidNullifiedDeref.xml?root=Technology_Project&view=markup SingleRef]
 +
| The deref() function of a nullified reference should not return a target even if the ref has a valid sml:uri child element.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidSchemeResult.xml?root=Technology_Project&view=markup InvalidSchemeResultContainsNonElements]
 +
| A model is invalid if a reference using smlxpath1 scheme resolves to anything other than an element set.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidSchemeSyntax.xml?root=Technology_Project&view=markup InvalidSchemeSyntaxError]
 +
| A model is invalid if the content of the smlxpath1 scheme is syntactically incorrect.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidSMLRefValue.xml?root=Technology_Project&view=markup InvalidSmlRefValue]
 +
| A model is invalid if the value of sml:ref is not valid
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidUnknownNamespace.xml?root=Technology_Project&view=markup InvalidSchemeNamespaceUnknown]
 +
| A model is invalid if a reference using the smlxpath1 scheme uses a prefix without a bound namespace.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InvalidWrongSMLNSURI.xml?root=Technology_Project&view=markup InvalidWrongSMLNSURI]
 +
| An incorrect namespace URI is bound to the SML prefix for one of the (required) SML references. This should result in a validation error because the reference is unresolved. Copied initially from targetRequired/valid.xml
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidXmlBase.xml?root=Technology_Project&view=markup InValidXMLBase]
 +
| A model is invalid if xml:base is not valid
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/InValidXmlBaseRelative.xml?root=Technology_Project&view=markup InValidXMLBaseRelative]
 +
| A model is invalid if the xml:base is not absolute and its value is used to transform a relative URI
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/MultipleRefToAnElement.xml?root=Technology_Project&view=markup MultipleRefToAnElement]
 +
| It is valid for an element in a document to be targeted by multiple different references from other documents
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/NullRefElement.xml?root=Technology_Project&view=markup NullRefElement]
 +
| It is valid for a reference element to be null
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/RefToNonRootElement.xml?root=Technology_Project&view=markup RefToNonRootElement]
 +
| It is valid for a reference in a document to target a non-root element in some other document.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/RefToRootElement.xml?root=Technology_Project&view=markup RefToRootElement]
 +
| It is valid for a reference in a document to target the root element in some other document.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidBareName.xml?root=Technology_Project&view=markup ValidBareNameAbsURI]
 +
| This SML-IF demonstrates the use of bare names in sml:uri references.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidBareNameDTDDeterminedID.xml?root=Technology_Project&view=markup ValidBareNameDTDDeterminedID]
 +
| This SML-IF demonstrates the use of bare names in sml:uri references. Copied from ValidBareName and converted from schema- to DTD-determined ID. The DTD forces the use of base64 encoding.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidBareNameMultipleSchemes.xml?root=Technology_Project&view=markup ValidBareNameMultipleSchemes]
 +
| An SML reference in this SML-IF document contains 2 references, one uses bare name and one uses smlxpath1. These two references resolve to the same element. It is a valid document.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidBareNameSameDocRef.xml?root=Technology_Project&view=markup ValidBareNameSameDocRef]
 +
| This SML-IF contains an SML URI reference that only contains the fragment component. The fragment component is a bare name. This URI reference will be dereferenced to an element in the same document.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidDanglingReference.xml?root=Technology_Project&view=markup ValidRefTwoSchemesNilSpecified]
 +
| A model is valid if it contains a nullified reference with two schemes, one resolving to an element and another unresolved.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidFragmentOnlyReference.xml?root=Technology_Project&view=markup ValidMissingBaseURIAttr2]
 +
| It is valid for a model to contain a reference with only a fragment. In which case, the reference points to a target element in the same document.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidInconsistentNonReference.xml?root=Technology_Project&view=markup ValidRefNilrefSpecified1]
 +
| A model is valid if it contains a none reference element (i.e. sml:ref is not specified) with multiple schemes resolving to two different elements
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidInconsistentReference.xml?root=Technology_Project&view=markup ValidRefNilrefSpecified1]
 +
| A model is valid if it contains a nullified reference with multiple schemes resolving to two different elements
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidMissingBaseURI.xml?root=Technology_Project&view=markup ValidMissingBaseURIAttr1]
 +
| A model is valid if there are not references and the base URI is missing
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidMultipleSchemes.xml?root=Technology_Project&view=markup ValidRefTwoSchemes]
 +
| A model is valid if a reference contains two schemes, both resolving to the same element
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidNilRef.xml?root=Technology_Project&view=markup ValidNilRefDefinition]
 +
| A model is valid if sml:nilref is used in conjunction with sml:ref="true"
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidNilRefPSVI.xml?root=Technology_Project&view=markup ValidNilRefPSVI]
 +
| A model is valid if sml:nilref is used in conjunction with sml:ref="true", even if the sml:nilref value is defaulted from the schema.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidReferenceScheme.xml?root=Technology_Project&view=markup ValidSchemeNamespaceInherited]
 +
| A model is valid when a reference using the smlxpath1 scheme uses a prefix declared in a containing element
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidSMLRefPSVI.xml?root=Technology_Project&view=markup SingleRef]
 +
| The deref() function of a nullified reference should not return a target even if the ref has a valid sml:uri child element.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidUnknownRefScheme.xml?root=Technology_Project&view=markup ValidRefOneSchemeResolvesOtherUnknown]
 +
| A model is valid if a reference contains two schemes, one resolving to an element and the other being unknown.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidXmlBase.xml?root=Technology_Project&view=markup ValidXmlBase]
 +
| A valid xml:base should not result in an error.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidXmlBaseOnDocumentElement.xml?root=Technology_Project&view=markup ValidXmlBaseOnDocumentElement]
 +
| A valid xml:base specified on a 'document' element should not result in an error.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidXmlBaseOnInstance.xml?root=Technology_Project&view=markup ValidXmlBaseOnInstance]
 +
| A valid xml:base on an instance document should not result in an error.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/references/ValidXmlBaseWinsOverBaseURI.xml?root=Technology_Project&view=markup ValidXmlBaseWinsOverBaseURI]
 +
| When both a baseURI and xml:base are specified, xml:base should be used.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Rule Binding Tests with Locators ===
 +
Tests that ensure that Schematron rules and rule bindings are correctly handled for by-reference documents
  
<b>Descripton:</b>
+
{|{{BMTableStyle}}
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.
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/RuleBindingLocators/InValidRuleBindingLocators.xml?root=Technology_Project&view=markup InValidRuleBindingLocators]
 +
| Since student 3 is bound, this SHOULD fail. Built by starting with Rules/ValidRuleBinding.xml and changing by-value files into by-reference, then changing the rule binding from student 2 to 3. The rule doc and each student doc is included by-reference instead of by-value.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/RuleBindingLocators/InValidRuleBindingLocatorsInlineSchematron.xml?root=Technology_Project&view=markup InValidRuleBindingLocatorsInlineSchematron]
 +
| Since student 3 is bound, this SHOULD fail. Built by starting with Rules/ValidRuleBinding.xml and changing by-value files into by-reference. Each student doc is included by-reference instead of by-value.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/RuleBindingLocators/RemoteDocumentRelativeLocator.xml?root=Technology_Project&view=markup TestDocumentLocator]
 +
| Tests the correct implementation of the locator element
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/RuleBindingLocators/ValidRuleBindingLocators.xml?root=Technology_Project&view=markup ValidRuleBindingLocators]
 +
| A model with a Schematron rule that is bound to some instance documents is valid if the rule is satisfied by all bound documents. This test case was built by taking ValidRuleBinding and pulling out its various component documents (schematron, schema, students 1-3) into separate documents and using locators to point to them. Note that you will have to tweak the locator values for this to work on your PC.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/RuleBindingLocators/ValidRuleBindingLocatorsRelative.xml?root=Technology_Project&view=markup ValidRuleBindingLocatorsRelative]
 +
| This test case was built by taking ValidRuleBindingLocators and altering the document URI values to remove the portion of it that would be "inherited" from the model base URI. One document URI begins with a slash, the others do not, as a test of which syntax(es) work. Note that you will have to tweak the Base URI value for this to work on your PC.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/RuleBindingLocators/ValidRuleBindingLocatorsRelativeXmlBase.xml?root=Technology_Project&view=markup ValidRuleBindingLocatorsRelativeXmlBase]
 +
| This test case was built by taking ValidRuleBindingLocators and specifying the model base URI using xml:base syntax, which the XML Base spec would require to be applied to all URIs including SMLIF document URI (there might be some ambiguity about smlif:base). One document URI begins with a slash, the others do not, as a test of which syntax(es) work. Note that you will have to tweak the Base URI value for this to work on your PC.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Rule Tests ===
 +
Tests that ensure that Schematron rules and rule bindings are correctly handled
  
=== ValidSameNameElements ===
+
{|{{BMTableStyle}}
 +
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValid.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InvalidLocidEnglish.xml?root=Technology_Project&view=markup InValidSchematronRuleEnglish]
 +
| 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InvalidLocidGerman.xml?root=Technology_Project&view=markup InValidSchematronRuleGerman]
 +
| 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InvalidLocidMissingBundle.xml?root=Technology_Project&view=markup InValidSchematronRuleMissingBundle]
 +
| 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).
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InvalidLocidMissingBundlePackage.xml?root=Technology_Project&view=markup InValidSchematronRuleMissingBundlePackage]
 +
| 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).
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InvalidLocidMissingKey.xml?root=Technology_Project&view=markup InValidSchematronRuleMissingKey]
 +
| 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValidRuleBinding-MultipleRulesSameDocument-BothFail.xml?root=Technology_Project&view=markup InValidRuleBinding-MultipleRulesSameDocument-BothFail]
 +
| Two rules are bound to the same document - both fail.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValidRuleBinding.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValidRuleBindingsWithRelativeURIs.xml?root=Technology_Project&view=markup InValidRuleBindingsWithRelativeURIs]
 +
| Tests that rule bindings having relative URIs are handled correctly. /org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding.xml was used as a base to start from. The same expected output should apply.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValidRuleBindingWithBaseURI.xml?root=Technology_Project&view=markup InValidRuleBindingWithBaseURI]
 +
| 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. This example binds an instance document with a rule binding using the base URI.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValidRuleBindingWithPrefix.xml?root=Technology_Project&view=markup InValidRuleBindingWithPrefix]
 +
| 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. This example binds an instance document based on the prefix of document aliases
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValidRuleType.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/InValidRuleTypeRestriction.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/Valid.xml?root=Technology_Project&view=markup ValidSchematronRule]
 +
| A model with a Schematron rule defined for an element is valid if all instances of the element satisfy the rule.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/ValidNoSML.xml?root=Technology_Project&view=markup ValidXMLSchema]
 +
| Basic XML Schema file, no SML extensions used.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/Rules/ValidRuleBinding.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Schema Binding Tests ===
 +
Tests the optional schema binding feature of SML.
  
<b>File:</b>
+
{|{{BMTableStyle}}
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])
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/schemaBinding/InvalidSchemaBinding.xml?root=Technology_Project&view=markup InvalidSchemaBinding]
 +
| 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 validation set whereas <S2, I1, I2, I3> is invalid because the instances contain a cycle and S2 specifies that type as acyclic. Schema binding is used to describe the latter validation set.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/schemaBinding/ValidNoSchemaBinding.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 but the no schema binding element is used to cancel out this binding. The document should thus be evaluated as valid.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Tests Combining Mixtures of Locators and In-line Schema/Instance documents ===
 +
Tests that ensure that schema validation results are the same regardless of whether the schema and/or instance documents are in-line.
  
<b>Descripton:</b>
+
{|{{BMTableStyle}}
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}.
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/SchemaLocators/InvalidInstanceSchemaInlineStudentInline.xml?root=Technology_Project&view=markup InvalidInstanceSchemaInlineStudentInline]
 +
| Student instance contains a content model invalid wrt its schema so it should always generate error messages.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/SchemaLocators/InvalidInstanceSchemaInlineStudentLocator.xml?root=Technology_Project&view=markup InvalidInstanceSchemaInlineStudentLocator.xml]
 +
| Student instance contains a content model invalid wrt its schema so it should always generate error messages.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/SchemaLocators/InvalidInstanceSchemaLocatorStudentInline.xml?root=Technology_Project&view=markup InvalidInstanceSchemaLocatorStudentInline.xml]
 +
| Student instance contains a content model invalid wrt its schema so it should always generate error messages.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/SchemaLocators/InvalidInstanceSchemaLocatorStudentLocator.xml?root=Technology_Project&view=markup InvalidInstanceSchemaLocatorStudentLocator.xml]
 +
| Student instance contains a content model invalid wrt its schema so it should always generate error messages.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Target Element Tests ===
 +
Tests that ensure correct implementation of <code>targetElement</code>
  
=== ValidTargetTypeWithSubstitutionGroup ===
+
{|{{BMTableStyle}}
 +
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetElement/InValid.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetElement/InValidSameNameElements.xml?root=Technology_Project&view=markup 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}.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetElement/InvalidValue.xml?root=Technology_Project&view=markup 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)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetElement/Valid.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetElement/ValidSameNameElements.xml?root=Technology_Project&view=markup 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}.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetElement/ValidWithSubstitutionGroup.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
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Target Required Tests ===
 +
Tests that ensure correct validation of <code>sml:targetRequired</code> attribute
  
<b>File:</b>
+
{|{{BMTableStyle}}
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])
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/InValid.xml?root=Technology_Project&view=markup InvalidTargetRequired]
 +
| If targetElement=GTE for a global element declaration E, and targetRequired=true, an instance of the SML reference cannot contain an unresolved reference which does not target any element in the model.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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. Copied from targetElement/InValidDerivationByRestriction.xml and changed to work with target required instead
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/InvalidMissingReference.xml?root=Technology_Project&view=markup InvalidTargetRequiredMissingReference]
 +
| If targetElement=GTE for a global element declaration E, and targetRequired=true, an instance of the SML reference must exist.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/InvalidNullReference.xml?root=Technology_Project&view=markup InvalidTargetRequiredNullReference]
 +
| If targetElement=GTE for a global element declaration E, and targetRequired=true, an instance of the SML reference cannot be null.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/InValidSameNameElements.xml?root=Technology_Project&view=markup 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}.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/InValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup InValidTargetRequiredWithSubstitutionGroup]
 +
| A global element declaration and its substitution group head must have compatible (in the sense of 'valid restriction') target required constraints. In this case, the GED does not require a target but its SGH does.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/valid.xml?root=Technology_Project&view=markup ValidTargetRequired]
 +
| Tests for correct usage of targetRequired.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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. Copied from targetElement/ValidDerivationByRestriction.xml and changed to work with target required instead
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/ValidFalseRequire.xml?root=Technology_Project&view=markup ValidTargetRequiredFalse]
 +
| 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. targetRequired=false.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/ValidSameNameElements.xml?root=Technology_Project&view=markup ValidTargetRequiredSameNameElements]
 +
| 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}.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/ValidType.xml?root=Technology_Project&view=markup ValidTargetRequiredWithTargetType]
 +
| 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. Includes targetRequired=true.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/ValidTypeFalse.xml?root=Technology_Project&view=markup ValidTargetRequiredFalseWithTargetType]
 +
| 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. Includes targetRequired=false.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetRequired/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup TargetRequiredValidWithSubstitutionGroup]
 +
| A global element declaration and its substitution group head must have compatible (in the sense of 'valid restriction') target required constraints. In this case, both the GED and its SGH require a target.
 +
| <font color=green>Complete</font>
 +
|}
 +
=== Target Type Tests ===
 +
Tests that ensure correct validation of <code>targetType</code>
  
<b>Descripton:</b>
+
{|{{BMTableStyle}}
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.
+
|-{{BMTHStyle}}
 +
!Test Name
 +
!Description
 +
!Status
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetType/InValid.xml?root=Technology_Project&view=markup InvalidTargetType]
 +
| If targetType='T' 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 T
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetType/InValidSameNameElements.xml?root=Technology_Project&view=markup 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}.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetType/InValidValue.xml?root=Technology_Project&view=markup 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)
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetType/Valid.xml?root=Technology_Project&view=markup ValidTargetType]
 +
| If targetType='T' 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 T or a derived type of T
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.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.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetType/ValidSameNameElements.xml?root=Technology_Project&view=markup 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}.
 +
| <font color=green>Complete</font>
 +
|-
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/n.tests/src/test-resources/targetType/ValidWithSubstitutionGroup.xml?root=Technology_Project&view=markup 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.
 +
| <font color=green>Complete</font>
 +
|}

Latest revision as of 10:22, 21 May 2009

COSMOS SML and SML-IF Validator Test Plan

Version 1.4, 21 May 2009

Authors: David Whiteman, Ali Mehregani, Hubert Leung, John Arwe

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. The content for the below test plan is generated using the TestPlanGenerator class in that plug-in, using the metadata (i.e. identity data) found in the SML-IF files in test-resources.

Test Suite

Acyclic Tests

Tests that check for valid cycles using sml:acyclic

Test Name Description Status
InvalidCyclesWithAcyclicReferences A model is invalid if an instance of an acyclic type CT references itself. Complete
InvalidCyclesWithAcyclicReferences A model is invalid if instances of an element type CT derived from the abstract acyclic element type CT' form a cycle. Complete
InvalidCyclesWithAcyclicReferences A model is invalid if instances of the acyclic anonymous type CT form a cycle Complete
InvalidCyclesWithAcyclicReferences A model is invalid if instances of an acyclic element type CT (or derived types by restriction) create a cycle Complete
InvalidCyclesWithAcyclicReferences A model is invalid if instances of an acyclic element type CT (or derived types by restriction) create a cycle Complete
AcyclicInValidCycleSameDoc A model is invalid if an instance of an acyclic type CT references itself, even w/in the same document Complete
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? Complete
ValidateAcyclicDefinition This test returns a warning if the sml:acyclic attribute is defined on an element declaration Complete
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 Complete
InvalidCyclesWithAcyclicReferences A model is valid if an element instance with sml:acyclic="true" forms a cycle but is not declared to be an SML reference (despite having a valid sml:uri scheme) Complete
InvalidCyclesWithAcyclicReferences A model is valid if an element instance with sml:acyclic="true" forms a cycle but is declared as a null SML reference (despite having a valid sml:uri scheme) Complete
AcyclicValidCycleSameDoc A model is valid if it has same-document cycles using instances of a type with sml:acyclic=?false?. Complete
ValidCycles3 This test verifies that it is valid to create cycles within documents, as long as instances of acyclic references do not create cycles. Complete
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? Complete
ValidCyclesWithAcyclicReference1 Let R1 and R2 be two reference types with sml:acyclic=?true?. Then a model is valid if it has inter-document cycles using instances of both R1 and R2 Complete
ValidUnresolvedReference A model is valid if an element instance with sml:acyclic="true" references an unresolved document. Complete

Base 64 Tests

Tests the base 64 element of the SML-IF spec

Test Name Description Status
Base64DTDEntity This test verifies that the code returns success when a document that is a child of the base64Data element is encoded in Base64 format. The encoded document is an XML document with DTD definition. The DTD has entity definitions that are used in the XML. A schema for the root element is provided, since noSchemaBinding is absent, in order to pass schema validity assessment (which is strict, since a schema containing the built-in components can be constructed). The test case avoids using noSchemaBinding, since the latter is optional, in order to be testable against all implementations. Complete
Base64DTDInvalidXML The encoded document is an XML document with DTD definition. The XML structure is invalid according to the DTD, but since DTD validation is not done by the SML/SML-IF validator, the SML validator should report success. A schema for the root element is provided, since noSchemaBinding is absent, in order to pass schema validity assessment (which is strict, since a schema containing the built-in components can be constructed). The test case avoids using noSchemaBinding, since the latter is optional, in order to be testable against all implementations. Complete
Base64DTDMissingEntities The encoded document is an XML document with DTD definition. The XML uses entities that are not defined in the DTD. The validation should fail because DTD is processed with fatal failure. Complete
Base64EncodedDoc An instance document is base64 encoded. R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml) Complete
Base64EncodedDocs All instance documents are base64 encoded. R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml) Complete
Base64EncodedSchema A schema document is base64 encoded. R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml) Complete
Base64EncodedSchemaAndDoc Data in both definition and instance sections is base64 encoded (1 of each). R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml) Complete
Base64EncodedSchemaAndDocs Data in both definition and instance sections is base64 encoded (1 schema + 3 instances). R1 and R2 are two unrelated reference types with sml:acyclic="true". The model is valid since the cycle in the instance documents is formed from unrelated types. Copied from acyclic test suite. (ValidCycles1.xml) Complete
Base64InvalidEncoding Encoded data in both definition and instance sections is invalid. Based on acyclic test suite test ValidCycles1.xml. Complete
Base64InvalidSML All instance documents in this SML-IF are base64-encoded. The instance documents have a cycle for an acyclic type. The SML-IF should be validated to false. Complete

Deref Tests

Tests that ensure proper operation of the deref() function

Test Name Description Status
SingleRef Verify a schematron test using a deref function to resolve an unrecognized reference scheme will fail Complete
InvalidSchemeDerefUsed A model is invalid if an smlxpath1 scheme contains a deref() in the evaluator. Complete
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. Complete
MultipleXpointer Verify that deref() can resolve references that target non-root elements using XPointer scheme. Complete
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. Complete
SingleRef Verify a schematron test using a deref function to resolve a reference with multiple schemes passes as long as both schemes resolve to the same element Complete

Identity Tests

Tests that validate the resolution of key references to elements

Test Name Description Status
InvalidConstraintGroup Define sml:key constraints that are INconsistent for identically named elements in the same type. Spec citation: 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 MUST have the same set of {SML identity-constraints definitions}. Complete
InvalidConstraintRefAttributes A model is invalid if an identity constraint includes both the 'ref' and 'name' attribute Complete
InvalidConstraintRefElements A model is invalid if the sml:field or sml:selector child elements are specified for a referenced identity constraint. Complete
InvalidConstraintRefKey A model is invalid if a referenced identity constraint type does not match to what it's resolved to. Complete
InvalidConstraintRefNoKey A model is invalid if a referenced identity constraint cannot be resolved Complete
InvalidConstraintSubstitution 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. Complete
InvalidDuplicateConstraintSubst A model is invalid if two constraint names indirectly declared through substitution group have the same name Complete
InvalidDuplicateConstraintName1 A model is invalid if two constraint names under the same element have the same name Complete
InValidKeyDuplicate Verify that a model with a key constraint is invalid if the field values are not unique. Complete
InValidKeyMissing Verify that a model with a key constraint is invalid if some field values are missing. Complete
InvalidConstraintSubstitution 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. Complete
InValidUnique Verify that a model with a unique constraint is invalid if the field values are not unique. Complete
ValidConstraintRefKeyref A model is valid if a referenced identity constraint is used using the 'ref' attribute. Complete
ValidKeyref Verify keyref constraint. Complete
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. Complete
ValidKeyUniqueDeref 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. Copy and tweak based on identity/ValidKeyUnique.xml Complete
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. Complete
InValidKeyDuplicate It is not an error if SML identity constraint and XML identity constraint share the same name. Complete

Miscellaneous Tests

Tests that check miscellaneous issues to ensure valid SML documents

Test Name Description Status
InValidInCompleteModel This test verifies that a referred-to instance document is treated as if it is not part of the interchange model. In this case, by coding a required reference to the missing document's root whose matches an alias. Complete
InValidAliasValue This test verifies that the code returns an error when an alias contains an invalid value. Complete
InValidAliasHasFragmentComp This test verifies that the code returns an error when an alias contains a fragment component. Complete
InValidDuplicateAliases This test verifies that the code returns an error when two aliases resolve to the same URI Complete
InvalidMultipleDocument This test verifies that the code returns an error if the data element contains more than one document. Complete
TestDocumentLocator Tests the correct implementation of the locator element Complete
TestRulesWithMultiplePatterns Tests that rules that have multiple patterns are handled correctly Complete
TestMultipleRulesUnderOnePattern Tests that patterns with multiple rules are handled correctly Complete
TestSchemaValidationFailure Tests that validation against the schema fails. Complete
ValidEmptyDocument This test verifies that it is valid to have an empty document. Complete

Reference Tests

Tests that validate the implementation of sml:ref

Test Name Description Status
UnresolvedRef A valid model can contain unresolved references Complete
IntraDocumentRef It is valid for a reference to target an element in the same document. Complete
InvalidBareNameUnresolved This SML-IF contains an SML reference that is a unresolved reference. Bare name is used in this reference. Complete
InvalidBareNameMultipleSchemes An SML reference in this SML-IF document contains 2 references, one uses bare name and one uses smlxpath1. These two references don't resolve to the same element. It is an error as the SML reference is inconsistent. Complete
InValidBaseURI A model is invalid if base URI is not valid Complete
InValidBaseURIRelative A model is invalid if the base URI is not absolute and the model contains a relative reference Complete
InValidBaseURIHasFragmentComp A model is invalid if the base URI contains a fragment Complete
InvalidRefTwoSchemes A model is invalid if it contains a reference with two schemes, one resolving to an element and the other unresolved Complete
InvalidRefOneSchemeResolves A model is invalid if a reference contains multiple schemes resolving to different elements. Complete
InValidMissingBaseURIAttr1 A model is invalid if a reference is relative and the base URI is missing Complete
InvalidRefResolvesToMultipleElements A model is invalid if a reference scheme resolves to multiple elements Complete
InvalidRefResolvesToMultipleElements A model is invalid if a reference element is identified with sml:ref="1" and its scheme resolves to multiple elements Complete
SingleRef The deref() function of a nullified reference should not return a target even if the ref has a valid sml:uri child element. Complete
InvalidSchemeResultContainsNonElements A model is invalid if a reference using smlxpath1 scheme resolves to anything other than an element set. Complete
InvalidSchemeSyntaxError A model is invalid if the content of the smlxpath1 scheme is syntactically incorrect. Complete
InvalidSmlRefValue A model is invalid if the value of sml:ref is not valid Complete
InvalidSchemeNamespaceUnknown A model is invalid if a reference using the smlxpath1 scheme uses a prefix without a bound namespace. Complete
InvalidWrongSMLNSURI An incorrect namespace URI is bound to the SML prefix for one of the (required) SML references. This should result in a validation error because the reference is unresolved. Copied initially from targetRequired/valid.xml Complete
InValidXMLBase A model is invalid if xml:base is not valid Complete
InValidXMLBaseRelative A model is invalid if the xml:base is not absolute and its value is used to transform a relative URI Complete
MultipleRefToAnElement It is valid for an element in a document to be targeted by multiple different references from other documents Complete
NullRefElement It is valid for a reference element to be null Complete
RefToNonRootElement It is valid for a reference in a document to target a non-root element in some other document. Complete
RefToRootElement It is valid for a reference in a document to target the root element in some other document. Complete
ValidBareNameAbsURI This SML-IF demonstrates the use of bare names in sml:uri references. Complete
ValidBareNameDTDDeterminedID This SML-IF demonstrates the use of bare names in sml:uri references. Copied from ValidBareName and converted from schema- to DTD-determined ID. The DTD forces the use of base64 encoding. Complete
ValidBareNameMultipleSchemes An SML reference in this SML-IF document contains 2 references, one uses bare name and one uses smlxpath1. These two references resolve to the same element. It is a valid document. Complete
ValidBareNameSameDocRef This SML-IF contains an SML URI reference that only contains the fragment component. The fragment component is a bare name. This URI reference will be dereferenced to an element in the same document. Complete
ValidRefTwoSchemesNilSpecified A model is valid if it contains a nullified reference with two schemes, one resolving to an element and another unresolved. Complete
ValidMissingBaseURIAttr2 It is valid for a model to contain a reference with only a fragment. In which case, the reference points to a target element in the same document. Complete
ValidRefNilrefSpecified1 A model is valid if it contains a none reference element (i.e. sml:ref is not specified) with multiple schemes resolving to two different elements Complete
ValidRefNilrefSpecified1 A model is valid if it contains a nullified reference with multiple schemes resolving to two different elements Complete
ValidMissingBaseURIAttr1 A model is valid if there are not references and the base URI is missing Complete
ValidRefTwoSchemes A model is valid if a reference contains two schemes, both resolving to the same element Complete
ValidNilRefDefinition A model is valid if sml:nilref is used in conjunction with sml:ref="true" Complete
ValidNilRefPSVI A model is valid if sml:nilref is used in conjunction with sml:ref="true", even if the sml:nilref value is defaulted from the schema. Complete
ValidSchemeNamespaceInherited A model is valid when a reference using the smlxpath1 scheme uses a prefix declared in a containing element Complete
SingleRef The deref() function of a nullified reference should not return a target even if the ref has a valid sml:uri child element. Complete
ValidRefOneSchemeResolvesOtherUnknown A model is valid if a reference contains two schemes, one resolving to an element and the other being unknown. Complete
ValidXmlBase A valid xml:base should not result in an error. Complete
ValidXmlBaseOnDocumentElement A valid xml:base specified on a 'document' element should not result in an error. Complete
ValidXmlBaseOnInstance A valid xml:base on an instance document should not result in an error. Complete
ValidXmlBaseWinsOverBaseURI When both a baseURI and xml:base are specified, xml:base should be used. Complete

Rule Binding Tests with Locators

Tests that ensure that Schematron rules and rule bindings are correctly handled for by-reference documents

Test Name Description Status
InValidRuleBindingLocators Since student 3 is bound, this SHOULD fail. Built by starting with Rules/ValidRuleBinding.xml and changing by-value files into by-reference, then changing the rule binding from student 2 to 3. The rule doc and each student doc is included by-reference instead of by-value. Complete
InValidRuleBindingLocatorsInlineSchematron Since student 3 is bound, this SHOULD fail. Built by starting with Rules/ValidRuleBinding.xml and changing by-value files into by-reference. Each student doc is included by-reference instead of by-value. Complete
TestDocumentLocator Tests the correct implementation of the locator element Complete
ValidRuleBindingLocators A model with a Schematron rule that is bound to some instance documents is valid if the rule is satisfied by all bound documents. This test case was built by taking ValidRuleBinding and pulling out its various component documents (schematron, schema, students 1-3) into separate documents and using locators to point to them. Note that you will have to tweak the locator values for this to work on your PC. Complete
ValidRuleBindingLocatorsRelative This test case was built by taking ValidRuleBindingLocators and altering the document URI values to remove the portion of it that would be "inherited" from the model base URI. One document URI begins with a slash, the others do not, as a test of which syntax(es) work. Note that you will have to tweak the Base URI value for this to work on your PC. Complete
ValidRuleBindingLocatorsRelativeXmlBase This test case was built by taking ValidRuleBindingLocators and specifying the model base URI using xml:base syntax, which the XML Base spec would require to be applied to all URIs including SMLIF document URI (there might be some ambiguity about smlif:base). One document URI begins with a slash, the others do not, as a test of which syntax(es) work. Note that you will have to tweak the Base URI value for this to work on your PC. Complete

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. Complete
InValidSchematronRuleEnglish 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. Complete
InValidSchematronRuleGerman 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. Complete
InValidSchematronRuleMissingBundle 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). Complete
InValidSchematronRuleMissingBundlePackage 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). Complete
InValidSchematronRuleMissingKey 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. Complete
InValidRuleBinding-MultipleRulesSameDocument-BothFail Two rules are bound to the same document - both fail. Complete
InValidRuleBinding-MultipleRulesSameDocument Two rules are bound to the same document. One passes, one fails. Complete
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. Complete
InValidRuleBindingsWithRelativeURIs Tests that rule bindings having relative URIs are handled correctly. /org.eclipse.cosmos.rm.validation.tests/src/test-resources/Rules/InValidRuleBinding.xml was used as a base to start from. The same expected output should apply. Complete
InValidRuleBindingWithBaseURI 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. This example binds an instance document with a rule binding using the base URI. Complete
InValidRuleBindingWithPrefix 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. This example binds an instance document based on the prefix of document aliases Complete
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. Complete
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. Complete
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. Complete
ValidSchematronRule A model with a Schematron rule defined for an element is valid if all instances of the element satisfy the rule. Complete
ValidXMLSchema Basic XML Schema file, no SML extensions used. Complete
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. Complete

Schema Binding Tests

Tests the optional schema binding feature of SML.

Test Name Description Status
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 Complete
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 Complete
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. Complete
InvalidSchemaBinding 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 validation set whereas <S2, I1, I2, I3> is invalid because the instances contain a cycle and S2 specifies that type as acyclic. Schema binding is used to describe the latter validation set. Complete
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 but the no schema binding element is used to cancel out this binding. The document should thus be evaluated as valid. Complete
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. Complete

Tests Combining Mixtures of Locators and In-line Schema/Instance documents

Tests that ensure that schema validation results are the same regardless of whether the schema and/or instance documents are in-line.

Test Name Description Status
InvalidInstanceSchemaInlineStudentInline Student instance contains a content model invalid wrt its schema so it should always generate error messages. Complete
InvalidInstanceSchemaInlineStudentLocator.xml Student instance contains a content model invalid wrt its schema so it should always generate error messages. Complete
InvalidInstanceSchemaLocatorStudentInline.xml Student instance contains a content model invalid wrt its schema so it should always generate error messages. Complete
InvalidInstanceSchemaLocatorStudentLocator.xml Student instance contains a content model invalid wrt its schema so it should always generate error messages. Complete

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. Complete
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. Complete
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}. Complete
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) Complete
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. Complete
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. Complete
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. Complete
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}. Complete
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 Complete

Target Required Tests

Tests that ensure correct validation of sml:targetRequired attribute

Test Name Description Status
InvalidTargetRequired If targetElement=GTE for a global element declaration E, and targetRequired=true, an instance of the SML reference cannot contain an unresolved reference which does not target any element in the model. Complete
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. Copied from targetElement/InValidDerivationByRestriction.xml and changed to work with target required instead Complete
InvalidTargetRequiredMissingReference If targetElement=GTE for a global element declaration E, and targetRequired=true, an instance of the SML reference must exist. Complete
InvalidTargetRequiredNullReference If targetElement=GTE for a global element declaration E, and targetRequired=true, an instance of the SML reference cannot be null. Complete
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}. Complete
InValidTargetRequiredWithSubstitutionGroup A global element declaration and its substitution group head must have compatible (in the sense of 'valid restriction') target required constraints. In this case, the GED does not require a target but its SGH does. Complete
ValidTargetRequired Tests for correct usage of targetRequired. Complete
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. Copied from targetElement/ValidDerivationByRestriction.xml and changed to work with target required instead Complete
ValidTargetRequiredFalse 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. targetRequired=false. Complete
ValidTargetRequiredSameNameElements 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}. Complete
ValidTargetRequiredWithTargetType 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. Includes targetRequired=true. Complete
ValidTargetRequiredFalseWithTargetType 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. Includes targetRequired=false. Complete
TargetRequiredValidWithSubstitutionGroup A global element declaration and its substitution group head must have compatible (in the sense of 'valid restriction') target required constraints. In this case, both the GED and its SGH require a target. Complete

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 target of some instance of E in the model is not an instance of T Complete
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. Complete
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}. Complete
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) Complete
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. Complete
ValidTargetType If targetType='T' 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 T or a derived type of T Complete
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. Complete
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}. Complete
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. Complete

Back to the top