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 "SML Overview"

(XML Schema Extensions)
Line 14: Line 14:
 
* Schematron Rules
 
* Schematron Rules
  
The next two sections delve into more detail for each method.
+
Before delving into each method, SML references needs to be explored. 
 +
 
 +
=== SML References ===
 +
 
 +
One significant advantage of using SML is the ability to reference elements within or outside an SML document.  The purpose of an SML reference is to declare a relationship between one entity and another.  For example, the applications making up a service, the service registered on a repository, or a service conformance to a service level agreement (SLA).  See the figure below:
 +
 
 +
 
 +
Although the standard is open to using any reference schema, there is a particular one defined: SML URI Scheme.  The syntax of the scheme is:
 +
 
 +
<code>
 +
<pre>
 +
SMLURI ::= URI ('#' SMLXPath1_Fragment_ID)?
 +
</pre>
 +
</code>
 +
 
 +
URI is dereferenced to retrieve the document and SMLXPath1_Fragment_ID is dereferenced to retrieve a specific element contained in the document.  The fragment is defined using XPath. Here is an example of an SML reference:
 +
 
 +
 
 +
<code>
 +
<pre>
 +
<RequiredPreRequisite sml:ref="true">
 +
  <sml:uri>Course1</sml:uri>
 +
</RequiredPreRequisite>
 +
</pre>
 +
</code>
  
 
=== XML Schema Extensions ===
 
=== XML Schema Extensions ===
  
In addition to using standard XML schema to define constraints, the SML constraint defines six constraints on SML references.
+
In addition to using standard XML schema to define constraints, the SML standard defines six constraints on SML references. Each constraint is described in more details below:
 +
 
 +
* sml:acyclic - Prohibits cycles for a referenced element type
 +
* sml:targetRequired - Indicates the requirement for a reference to be resolved
 +
* sml:targetElement - Indicates the element name a reference should resolve to
 +
* sml:targetType - Indicates the element type a reference should resolve to
 +
* sml:key - Similar to xs:key but allows cross document references
 +
* sml:keyref - Similar to xs:keyref but allows cross document references
 +
* sml:unique - Similar to xs:unique but allows cross document references
 +
 
 +
=== Schematron Rules ===

Revision as of 15:07, 25 August 2008

Service Modeling Language Overview

This document gives an overview of the emerging standards, Service Modeling Language (SML) and Service Modeling Language Interchange Format (SML-IF) and their support in COSMOS. For a complete description, see the linked standards and COSMOS Eclipse-based documentation.

What is SML?

Service Modeling Language (SML) is "used to model complex services and systems, including their structure, constraints, policies, and best practices." It uses an extension of XML schema and is based on a profile of Schematron.

The language is domain neutral and can be applied to "deployment, monitoring, policy, health, capacity planning, service level agreements", and etc...

The constraints are captured in two ways:

  • XML Schema Extensions
  • Schematron Rules

Before delving into each method, SML references needs to be explored.

SML References

One significant advantage of using SML is the ability to reference elements within or outside an SML document. The purpose of an SML reference is to declare a relationship between one entity and another. For example, the applications making up a service, the service registered on a repository, or a service conformance to a service level agreement (SLA). See the figure below:


Although the standard is open to using any reference schema, there is a particular one defined: SML URI Scheme. The syntax of the scheme is:

 SMLURI ::= URI ('#' SMLXPath1_Fragment_ID)?

URI is dereferenced to retrieve the document and SMLXPath1_Fragment_ID is dereferenced to retrieve a specific element contained in the document. The fragment is defined using XPath. Here is an example of an SML reference:


<RequiredPreRequisite sml:ref="true">
   <sml:uri>Course1</sml:uri>
</RequiredPreRequisite>

XML Schema Extensions

In addition to using standard XML schema to define constraints, the SML standard defines six constraints on SML references. Each constraint is described in more details below:

  • sml:acyclic - Prohibits cycles for a referenced element type
  • sml:targetRequired - Indicates the requirement for a reference to be resolved
  • sml:targetElement - Indicates the element name a reference should resolve to
  • sml:targetType - Indicates the element type a reference should resolve to
  • sml:key - Similar to xs:key but allows cross document references
  • sml:keyref - Similar to xs:keyref but allows cross document references
  • sml:unique - Similar to xs:unique but allows cross document references

Schematron Rules

Back to the top