Skip to main content

Notice: This Wiki is now read only and edits are no longer 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 Design 237924"

(New page: == Create additional test cases for the SML validator == === Change History === {|{{BMTableStyle}} !align="left"|Name: !align="left"|Date: !align="left"|Revised Sections: |- |David White...)
 
(Purpose)
Line 70: Line 70:
 
== Purpose ==
 
== Purpose ==
  
...paste list here...
+
This enhancement is to ensure we provide complete test coverage so that our SML validator can be declared a fully compliant implementation of SML 1.1 and SML-IF 1.1 specs.
 +
 
 +
=== Tests ===
 +
 
 +
'''Color legend:'''
 +
* <font color=red>Test cases we need to address as part of this enhancement</font>
 +
* Test cases already supported by our implementation
 +
 
 +
The section headings map to those in [[COSMOS_SML_Test_Plan|Service Modeling Language 1.1 Test Plan]].
 +
 
 +
'''2.2 Rule Bindings'''
 +
 
 +
*  1-on-1 rule bindings (valid and invalid)
 +
*  1-on-2 rule bindings (valid and invalid)
 +
 
 +
'''4 References'''
 +
 
 +
*  Reference with one scheme
 +
*  Reference with two recognized schemes
 +
*  Reference with one recognized and one unrecognized scheme
 +
*  Reference with two unresolved scheme
 +
 
 +
*  Nullified references
 +
*  Specifying sml:nilref without sml:ref
 +
*  Inconsistent references that are nullified (to ensure nullified references are not processed)
 +
 
 +
*  Deref used in xpath1scheme()
 +
*  Unknown namespace in xpath1scheme()
 +
*  Unresolved xpath1scheme() scheme
 +
*  Syntax error in xpath1scheme()
 +
*  Valid xpath1scheme()
 +
 
 +
*  Empty reference element
 +
*  Intra-document reference
 +
*  Relative reference with an undefined interchange set base uri
 +
*  Reference resolving to multiple elements
 +
*  Reference resolving to no element (document URI is unresolved)
 +
*  <font color=red>Reference resolving to no element (fragment is unresolved)</font>
 +
*  Reference resolving to a non-root element
 +
*  Multiple references to a single element
 +
*  <font color=red>Reference with sml:ref set to an invalid value</font>
 +
 
 +
'''Note:''' Does the spec allow multiple sml:uri elements as a child of a reference element?  The first point under 4.3.1 states that exactly one sml:uri element should be included as a child of a reference element.  There are some test cases where two instances of sml:uri are used to test references with multiple recognized schemes.  We need to change them if the spec doesn’t allow it.
 +
One suggestion is to define a simple reference scheme.
 +
 
 +
'''4.2.7 deref() Function'''
 +
 
 +
*  Processing a deref function in schematron rule where the function is applicable to multiple elements
 +
*  Processing a deref function in schematron rule where the function is applicable to a single element
 +
*  Use of deref with a reference that include fragments
 +
*  <font color=red>Use of deref with a reference that uses an unrecognized scheme
 +
*  Use of deref with a reference consisting of two schemes that resolve to the same target element
 +
*  Use of deref with a reference consisting of two schemes that resolve to two different target elements
 +
*  Use of deref with a reference resolving to multiple elements
 +
*  Use of deref with a reference consisting of two schemes with each resolving to multiple target elements that are different</font>
 +
 
 +
'''5.1.1 sml:acyclic'''
 +
 
 +
*  Invalid/valid acyclic flag on a non-abstract, global type declaration
 +
*  <font color=red>Invalid acyclic flag on an abstract type declaration
 +
*  Invalid acyclic flag on a type declaration with local element declarations
 +
*  Invalid acyclic flag on an anonymous type declaration</font>
 +
*  Invalid/valid derivation by extension
 +
*  <font color=red>Invalid/valid acyclic cases by restriction</font>
 +
*  Defining acyclic on an element declaration
 +
*  Valid two acyclic references forming a cycle
 +
*  Valid cycle with non-acyclic reference type
 +
*  <font color=red>Invalid acyclic flag with one node referencing itself</font>
 +
 
 +
'''5.1.2 Constraints on SML Reference Targets'''
 +
 
 +
*  Elements with name=
 +
*  Elements with ref=
 +
*  Global element
 +
*  Local element
 +
*  Defined on complex type instead of element declaration
 +
*  Invalid/valid derivation by restriction
 +
*  Invalid/valid group substitution
 +
*  Invalid value for the constraints
 +
*  Consistent target constraints for elements with same name and namespace contained in content model of a complex type
 +
*  sml:targetRequired = true and reference element is sml:nil=true
 +
*  <font color=red>Derivation by extension</font>
 +
 
 +
'''5.2 SML Identity Constraints'''
 +
 
 +
*  Elements with name=
 +
*  <font color=red>Element with ref=</font>
 +
*  Defining the constraint on a type declaration
 +
*  Presence of the name attribute along with the ref attribute
 +
*  Presence of field and selector when ref attribute is set
 +
*  Inconsistent ref attribute
 +
*  Selector statement with deref()
 +
*  Field statement with deref()
 +
*  <font color=red>Global element declaration '''E''' has a substitution group affiliation '''G''', with inconsistent constraint
 +
*  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>
 +
 
 +
'''6.2 Rule Support'''
 +
 
 +
*  Evaluation of XPath expression augmented to sml:deref() function
 +
*  Global element declarations
 +
*  Global types declaration
 +
*  <font color=red>Local element declaration
 +
*  Anonymous type declaration
 +
*  Abstract element/type declaration</font>
 +
*  Applying applicable rules by extension
 +
*  Applying applicable rules by restriction
 +
 
 +
 
 +
 
 +
=== SML-IF Features ===
 +
 
 +
 
 +
*  Well formed SML-IF document
 +
*  Valid against SML-IF’s schema
 +
*  Embedded and remotely referenced documents
 +
*  <font color=red>Definition/Instance documents in base64 encoded format</font>
 +
*  Empty document content
 +
*  Remotely referenced instance document
 +
*  <font color=red>Remotely referenced definition document
 +
*  Remotely referencing a document with an unrecognized locator scheme</font>
 +
*  Invalid base URI
 +
*  Base URI with a fragment
 +
*  Relative URI with/without a base URI
 +
*  <font color=red>Relative URI with document base URI
 +
*  Relative URI with interchange base URI and document base URI</font>
 +
*  Two documents with duplicate aliases
 +
*  <font color=red>One document with duplicate aliases
 +
*  One document with duplicate aliases but with one specified relatively</font>
 +
*  Document alias with a fragment component
 +
*  <font color=red>schemaLocation attribute on xs:include
 +
*  schemaLocation attribute on xs:redefine
 +
*  schemaLocation attribute on instance</font>
 +
*  No schema binding
 +
*  <font color=red>Schema binding with no match
 +
*  Schema binding with default only
 +
*  Schema binding with a subset + default
 +
*  Schema binding with multiple matches
 +
*  Use of an outside document when schemaComplete is true</font>
  
 
== Open Issues/Questions ==
 
== Open Issues/Questions ==

Revision as of 21:32, 26 June 2008

Create additional test cases for the SML validator

Change History

Name: Date: Revised Sections:
David Whiteman/Ali Mehregani 06/26/2008
  • Initial creation

Workload Estimation

Rough workload estimate in person weeks
Process Sizing Names of people doing the work
Design .5 David Whiteman
Code 2* David Whiteman
Test 1 David Whiteman
Documentation 0
Build and infrastructure 0
Code review, etc.* 0
TOTAL 3.5
  • -- sizing assumes current RM team member

Terminologies/Acronyms

The terminologies/acronyms below are commonly used throughout this document.

Term Definition
SML Service Modeling Language
SML-IF Service Modeling Language - Interchange Format

Purpose

This enhancement is to ensure we provide complete test coverage so that our SML validator can be declared a fully compliant implementation of SML 1.1 and SML-IF 1.1 specs.

Tests

Color legend:

  • Test cases we need to address as part of this enhancement
  • Test cases already supported by our implementation

The section headings map to those in Service Modeling Language 1.1 Test Plan.

2.2 Rule Bindings

  • 1-on-1 rule bindings (valid and invalid)
  • 1-on-2 rule bindings (valid and invalid)

4 References

  • Reference with one scheme
  • Reference with two recognized schemes
  • Reference with one recognized and one unrecognized scheme
  • Reference with two unresolved scheme
  • Nullified references
  • Specifying sml:nilref without sml:ref
  • Inconsistent references that are nullified (to ensure nullified references are not processed)
  • Deref used in xpath1scheme()
  • Unknown namespace in xpath1scheme()
  • Unresolved xpath1scheme() scheme
  • Syntax error in xpath1scheme()
  • Valid xpath1scheme()
  • Empty reference element
  • Intra-document reference
  • Relative reference with an undefined interchange set base uri
  • Reference resolving to multiple elements
  • Reference resolving to no element (document URI is unresolved)
  • Reference resolving to no element (fragment is unresolved)
  • Reference resolving to a non-root element
  • Multiple references to a single element
  • Reference with sml:ref set to an invalid value

Note: Does the spec allow multiple sml:uri elements as a child of a reference element? The first point under 4.3.1 states that exactly one sml:uri element should be included as a child of a reference element. There are some test cases where two instances of sml:uri are used to test references with multiple recognized schemes. We need to change them if the spec doesn’t allow it. One suggestion is to define a simple reference scheme.

4.2.7 deref() Function

  • Processing a deref function in schematron rule where the function is applicable to multiple elements
  • Processing a deref function in schematron rule where the function is applicable to a single element
  • Use of deref with a reference that include fragments
  • Use of deref with a reference that uses an unrecognized scheme
  • Use of deref with a reference consisting of two schemes that resolve to the same target element
  • Use of deref with a reference consisting of two schemes that resolve to two different target elements
  • Use of deref with a reference resolving to multiple elements
  • Use of deref with a reference consisting of two schemes with each resolving to multiple target elements that are different

5.1.1 sml:acyclic

  • Invalid/valid acyclic flag on a non-abstract, global type declaration
  • Invalid acyclic flag on an abstract type declaration
  • Invalid acyclic flag on a type declaration with local element declarations
  • Invalid acyclic flag on an anonymous type declaration
  • Invalid/valid derivation by extension
  • Invalid/valid acyclic cases by restriction
  • Defining acyclic on an element declaration
  • Valid two acyclic references forming a cycle
  • Valid cycle with non-acyclic reference type
  • Invalid acyclic flag with one node referencing itself

5.1.2 Constraints on SML Reference Targets

  • Elements with name=
  • Elements with ref=
  • Global element
  • Local element
  • Defined on complex type instead of element declaration
  • Invalid/valid derivation by restriction
  • Invalid/valid group substitution
  • Invalid value for the constraints
  • Consistent target constraints for elements with same name and namespace contained in content model of a complex type
  • sml:targetRequired = true and reference element is sml:nil=true
  • Derivation by extension

5.2 SML Identity Constraints

  • Elements with name=
  • Element with ref=
  • Defining the constraint on a type declaration
  • Presence of the name attribute along with the ref attribute
  • Presence of field and selector when ref attribute is set
  • Inconsistent ref attribute
  • Selector statement with deref()
  • Field statement with deref()
  • Global element declaration E has a substitution group affiliation G, with inconsistent constraint
  • 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}.

6.2 Rule Support

  • Evaluation of XPath expression augmented to sml:deref() function
  • Global element declarations
  • Global types declaration
  • Local element declaration
  • Anonymous type declaration
  • Abstract element/type declaration
  • Applying applicable rules by extension
  • Applying applicable rules by restriction


SML-IF Features

  • Well formed SML-IF document
  • Valid against SML-IF’s schema
  • Embedded and remotely referenced documents
  • Definition/Instance documents in base64 encoded format
  • Empty document content
  • Remotely referenced instance document
  • Remotely referenced definition document
  • Remotely referencing a document with an unrecognized locator scheme
  • Invalid base URI
  • Base URI with a fragment
  • Relative URI with/without a base URI
  • Relative URI with document base URI
  • Relative URI with interchange base URI and document base URI
  • Two documents with duplicate aliases
  • One document with duplicate aliases
  • One document with duplicate aliases but with one specified relatively
  • Document alias with a fragment component
  • schemaLocation attribute on xs:include
  • schemaLocation attribute on xs:redefine
  • schemaLocation attribute on instance
  • No schema binding
  • Schema binding with no match
  • Schema binding with default only
  • Schema binding with a subset + default
  • Schema binding with multiple matches
  • Use of an outside document when schemaComplete is true

Open Issues/Questions

All reviewer feedback should go in the Talk page for 237924.


Back to the top