Namespaces and Identifiers

  • WSML adopts the namespace mechanism of RDF; a namespace can be seen as part of an IRI 
    • Namespaces can be used to syntactically distinguish elements of multiple WSML specifications and, more generally, resources on the Web
    • A namespace denotes a syntactical domain for naming resources
  • An identifier in WSML is either a data value , an IRI , an anonymous ID , or a variable
    • The sets of identifiers of the following items are disjoint: ontology, goal, Web service, ooMediator, ggMediator, wgMediator, wwMediator, capability, interface, choreography, orchestration, state signature, grounding identifier, variant identifier, datatype wrapper identifier, built-in predicate identifier
  • Namespaces were first introduced in XML for the purpose of qualifying names which originate from different XML documents. In XML, each qualified name consists of a tuple <namespace, localname>. RDF adopts the mechanism of namespaces from XML with the difference that qualified names are not treated as tuples, but rather as abbreviations for full URIs. 
  • WSML adopts the namespace mechanism of RDF. A namespace can be seen as part of an IRI. 

Namespaces and Identifiers (cont')

  • Namespaces can be used to syntactically distinguish elements of multiple WSML specifications and, more generally, resources on the Web. A namespace denotes a syntactical domain for naming resources.
  • Whenever a WSML specification has a specific identifier which corresponds to a Web address, it is good practice to have a relevant document on the location pointed to by the identifier. This can either be the WSML document itself or a natural language document related to the WSML document. Note that the identifier of an ontology does not have to coincide with the location of the ontology. It is good practice, however, to include a related document, possibly pointing to the WSML specification itself, at the location pointed to by the identifier.
  • For identifiers: If the same identifier is used for different definitions, it is interpreted differently depending on the context. In a concept definition, an identifier is interpreted as a concept; in a relation definition this same identifier is interpreted as a relation. If, however, the same identifier is used in separate definitions, but with the same context, then the interpretation of the identifier has to conform to both definitions and thus the definitions are interpreted in a connectional way. For example, if there are two concept definitions which are attached to the same concept identifier, the resulting concept definition includes all attributes of the original definitions. Also if the same attribute is defined in both concept definitions, the range of the resulting attribute will be equivalent to the connection of the ranges of the original attributes.

Data Values

  • WSML has direct support for different types of concrete data, namely, strings, integers and decimals, which correspond to the XML Schema primitive datatypes string, integer and decimal
  • Concrete values can then be used to construct more complex datatypes, corresponding to other XML Schema primitive and derived datatypes, using datatype constructor functions
  • Examples:
    age ofType xsd#integer 
    hasChildren ofType xsd#boolean

Internationalized Resource Identifiers

  • The IRI (Internationalized Resource Identifier) mechanism provides a way to identify resources
    • IRIs may point to resources on the Web (in which case the IRI can start with 'http://'), but this is not necessary (e.g. books can be identified through IRIs starting with 'urn:isbn:')
      • "" 
      • ""
  • An IRI can be abbreviated to a Compact URI - it consists of two parts, namely, the namespace prefix and the local part
    • A Compact URI is written using a namespace prefix and a localname, separated by a hash ('#'): namespace_prefix#localname

      dc#title ( 
      foaf#name ( 
      xsd#string ( 
      Person ( 
      hasChild (

Anonymous Identifiers

  • An anonymous identifier represents an IRI which is meant to be globally unique
    • Unnumbered anonymous IDs are denoted with ‘_#’. Each occurrence of ‘_#’ denotes a new anonymous ID and different occurrences of ‘_#’ are unrelated
    • Numbered anonymous IDs are denoted with ‘_#n’ where n stands for an integer denoting the number of the anonymous ID

      _#[a hasValue _#1] and _#1 memberOf b. 
      _#1[a hasValue _#] and _# memberOf _#.
  • Anonymous identifiers are disallowed for the following elements:
    • the top-level elements ontology, goal, webService, ooMediator, ggMediator, wgMediator and wwMediator
    • capability, interface, choreography and orchestration


  • Variable names start with an initial question mark "?"
  • May only occur in place of concepts, attributes, instances, relation arguments or attribute values
    • A variable may not, for example, replace a WSML keyword however
  • Variables may only be used:
    • Inside of logical expressions, and 
    • As values in a non-functional property definition or in the sharedVariables block within capability definitions
  • Examples: ?x, ?y1, ?myVariable

WSML Prologue

  • WSML Prologue contains all those elements that are in common between all types of WSML specifications and all WSML variants:
    • WSML Variant e.g. the WSML variant reference for a WSML-Flight specification is:
      wsmlVariant _
    • Namespace References, e.g. 

      namespace {_"",
      dc _"", 
      foaf _"", 
      wsml _"", 
      loc _"", 
      oo _""}

      namespace _""
    • WSML header - consists of items that any WSML specification may have: annotations, import ontologies and use mediators

WSML header

  • Annotations

    dc#title hasValue "WSML example ontology"dc#subject hasValue "family" 
    dc#description hasValue "fragment of a family ontology to provide WSML examples"
    dc#contributor hasValue { _"", 
    _"" }
    dc#date hasValue xsd#date("2004-11-22")
    dc#format hasValue "text/html"
    dc#language hasValue "en-US"
    dc#rights hasValue _""
    wsml#version hasValue "$Revision: 1.238 $" 
  • Importing Ontologies
    importsOntology {_"", _""}
  • Using Mediators
    usesMediator _""