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

COSMOS Design 237924

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/Ali Mehregani
Code 2 David Whiteman/Ali Mehregani
Test 0 (testing is part of development)
Documentation 0
Build and infrastructure 0
Code review, etc.* 0
TOTAL 2.5

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 (bugzilla 237924) 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.

This section lists all tests that will be implemented after this enhancement is complete.

Color legend:

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

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