wsml logo

D36v1.0 WSML/XML

WSML Working Draft 28 July 2008

This version
http://www.wsmo.org/TR/d36/v1.0/20080728/
Latest version
http://www.wsmo.org/TR/d36/v1.0/
Previous version
http://www.wsmo.org/TR/d36/v0.1/20080715/
Editor:
Ioan Toma
Authors:
The WSML working group members

For printing and off-line reading, this document is also available in non-normative PDF version.


Copyright 2008 STI Innsbruck, All Rights Reserved. STI Innsbruck liability, trademark, document use, and software licensing rules apply.


This document is part of the specification of the Web Service Modeling Language (WSML), version 1.0.

The specification of WSML 1.0 consists of the following four documents.


Abstract

This document presents the XML representation of WSML, called WSML/XML. A particular WSML description is an XML document which conforms to the WSML/XML schema.


Table of Contents

1. Introduction

2. XML Syntax for WSML

References

Acknowledgements


1. Introduction

This document presents the XML syntax for WSML. The XML exchange syntax is introduced to overcome the limitations with respect to the exchange of the human-readable syntax over the Web. This syntax is the preferred syntax for the exchange of WSML specifications between machines. The XML syntax for WSML is based on abstract syntax presented in [WSML-Semantics] and is compliant with the human-readable syntax presented in [WSML].

The Rule Interchange Format (RIF) Working Group is in the process of specifying the RIF Basic Logic Dialect (RIF-BLD) [RIF-BLD], which is an XML-based language for exchanging rules over the Web. RIF-BLD captures many of the features of the logical expression syntax of WSML-Rule. The RIF Framework for Logic Dialects (RIF-FLD) [RIF-FLD] may be used for defining extensions (or restrictions) of RIF-BLD; it captures all of the features of the WSML logical expression syntax. One may thus imagine a dialect of RIF that captures all features of the WSML logical expression syntax, and consequently the conceptual syntax for ontologies (e.g., through annotations). In addition, an RIF dialect may be defined that can capture WSML Web service, goal, and mediator descriptions. It is expected that future versions of WSML will specify how RIF may be used for the XML-based exchange of WSML descriptions over the Web.

2. XML Syntax for WSML

In this chapter, we explain the XML syntax for WSML. The XML syntax for WSML captures all WSML variants. The user can specify the variant of a WSML/XML document through the 'variant' attribute of the <wsml> root element.

The complete XML Schema, including documentation, for the WSML/XML syntax can be found is available online at http://www.wsmo.org/TR/d36/v1.0/20080728/xml-syntax/wsml_xml_syntax.xsd.

This schema includes two module schemas:

The WSML identifiers schema is a XML schema defining the WSML identifiers, such as IRIs, anonymous identifiers, variables, etc. Elements of this schema are used to define elements of WSML/XML schema document and WSML Logical expression schema. The WSML Logical expressions schema elements are used to define the elements of WSML/XML schema document.

Furthermore, the schema imports an additional schema for the basic Dublin Core elements (http://dublincore.org/schemas/xmls/qdc/2003/04/02/dc.xsd).

Userfriendly documentation for the schemas is available from the following locations:

In the rest of the section we introduce the transformation from WSML abstract and surface syntax to WSML XML syntax. Table 2.1 provides the transformations of the surface and abstract syntax, Table 2.2 presents the transformation of logical expressions, while in Table 2.3 a simple mapping example is given.

The basic namespace for WSML/XML is http://www.wsmo.org/wsml/wsml-syntax#. This is the namespace for all elements in WSML.

Before beginning the transformation process the following pre-processing steps need to be performed:

T(...) denotes a function which is recursively called to transform the a fragment of WSML abstract syntax or surface synatx to the XML syntax. An WSML abstract syntax fragment or WSML surface syntax fragment is given as parameter to function T.

In Table 2.1, all WSML keywords are marked bold. A,B,C stand for identifiers, D stands for a datatype identifier, DVi stands for an integer value, DVd stands for a decimal, and DVs stands for a string data value. Name stand for identifier or symbol nil, k,m,n are integer numbers. Productions in the grammar are underlined and linked to the production rules in [WSML], Appendix A. Note that in the table we use the familiar sQName macro mechanism to abbreviate the IRIs of resources.

In the table, &wsml; stands for the WSML namespace http://www.wsmo.org/wsml/wsml-syntax# and &xs; stands for the XML schema namespace http://www.w3.org/2001/XMLSchema#.

Table 2.1: Mapping of WSML abstract syntax and WSML surface syntax to WSML/XML syntax
WSML abstract syntax WSML surface syntax XML Tree Remarks
WSML Description T(
(varID,O,G,WS,M,C,I)description
)
T (
wsmlVariant varID
  definition1
  ...
  definitionn
)
<wsml xmlns="http://www.wsmo.org/wsml/wsml-syntax#" variant="varID">
  T(definition1)
  ...
  T(definitionn)
</wsml>
definition1 ...definitionn are Ontology, Goal, WebService, Mediators, Capability and Interface; O,G,WS,M,C,I are the set of previous mentioned entities; varID is the WSML variant
WSML Ontology T (
(Name,ann,ontID,medID,concept,
relation,instance,relInstance,axiom)ontology
)
T2 (
ontology Name
  header1
  ...
  headern
  ontology_element1
  ...
  ontology_elementn
)
<ontology name="Name">
  T(header1)
  ...
  T(headern)
  T(ontology_element1)
  ...
  T(ontology_elementn)
</ontology>
An ontology_element represents all possible content of an ontology definition, i.e., concepts, relations, instances, ...; header1,...,headern are header elements that contain elements from annotations, ontology identifiers (imported ontologies) and ooMediators identifiers sets denoted by: ann,ontID,medID; ontology_element1,...,ontology_elementn are ontology elements from the sets: concept, relation,instance,relInstance,axiom
WSML Concept T (
(Name,ann,conceptID,attribute)concept
)
T (
concept Name
  subConceptOf {B1,...,Bn}
  annotations
  attribute1
  ...
  attributen
)
<concept name="Name">
  T(annotations)
  <superConcept>B1<superConcept>
  ...
  <superConcept>Bn<superConcept>
  T(attribute1)
  ...
  T(attributen)
</concept>
ann is a set of WSML annotations represented using surface syntax as annotations; conceptID is the set of super-concepts identifiers represented using surface syntax as {B1,...,Bn} and attribute is the set of attributes represented using surface syntax as attribute1,...,attributen
WSML Attribute Definition T (
(Name,ann,defType,feature,minCard,maxCard,rangeID)ad
)
T (
Name attributefeature1 ... attributefeaturen ofType cardinality C
annotations
)
<attribute name="Name" type="constraining">
  <range>C</range>
  T(attributefeature1)
  ...
  T(attributefeaturen)
  T(cardinality)
  T(annotations)
</attribute>
ann is a set of WSML annotations represented using surface syntax as annotations; defType is ofType, feature is the set of attribute features represented using surface syntax as attributefeature1 ... attributefeaturen, minCard and maxCard corespond to cardinality and rangeID is a set of concept identifiers
WSML Attribute Definition T (
(Name,ann,defType,feature,minCard,maxCard,rangeID)ad
)
T (
Name attributefeature1 ... attributefeaturen impliesType cardinality C
annotations
)
<attribute name="Name" type="inferring">
  <range>C</range>
  T(attributefeature1)
  ...
  T(attributefeaturen)
  T(cardinality)
  T(annotations)
</attribute>
ann is a set of WSML annotations represented using surface syntax as annotations; defType is impliesType, feature is the set of attribute features represented using surface syntax as attributefeature1,...,attributefeaturen, minCard and maxCard corespond to cardinality and rangeID is a set of concept identifiers
  T (
transitive
)
T (
transitive
)
<transitive/>  
  T (
symmetric
)
T (
symmetric
)
<symmetric/>  
  T (
reflexive
)
T (
reflexive
)
<reflexive/>  
  T (
inverseOf
)
T (
inverseOf(A)
)
<inverseOf type="A"/>  
  T (
subAttributeOf
)
T (
subAttributeOf(A)
)
<subAttributeOf type="A"/>  
  T (
(minCard,maxCard)
)
T (
(minCard maxCard)
)
<minCardinality>minCard</minCardinality>
<maxCardinality>maxCard</maxCardinality>
 
T (
(minCard,maxCard)
)
T (
(card)
)
<minCardinality>card</minCardinality>
<maxCardinality>card</maxCardinality>
 
WSML Instance T (
(Name,ann,conceptID,attVal)instance
)
T (
instance Name
  memberOf C1,...,Cn
  annotations
  attributevalue1
  ...
  attributevaluen
)
<instance name="Name">
  <memberOf>C1</memberOf>
  ...
  <memberOf>Cn</memberOf>
  T(annotations)
  T(attributevalue1)
  ...
  T(attributevaluen)
</instance>
ann is a set of WSML annotations represented using surface syntax as annotations, conceptID is a set of concept identifiers represented using the surface syntax as C1,...,Cn, attVal is a set of attribute value pairs represented using the surface syntax as attributevalue1,...,attributevaluen
WSML Attribute Value Pair T (
(Name,valueID)av
)
T (
Name hasValue {value1, ..., valuen}
)
<attributeValue name="Name">
  T(value1)
  ...
  T(valuen)
</attributeValue>
A value has always a datatype. There are four built-in datatypes: IRI, string, integer, decimal. In addition any arbitrary datatype can be defined by use of datatype wrappers. The next four transformations show how to handle these five cases; valueID is a set of instance and data value identifiers represented using surface syntax as value1,...,valuen. Please note that attribute values pairs used in a nonfunctional property definition might include also variables.
WSML IRI T (
  IRI
)
T (
  IRI
)
<value type="&wsml;iri">
  IRI
</value>
 
String T (
  DVs
)
T (
  DVs
)
<value type="&xsd;string">
  DVs
</value>
 
Integer T (
  DVi
)
T (
  DVi
)
<value type="&xsd;integer">
  DVi
</value>
 
Decimal T (
  DVd
)
T (
  DVd
)
<value type="&xsd;decimal">
  DVd
</value>
 
WSML Data Value T (
  DV
)
T (
  DV
)
<value type="http://www.example.org/datatype#any">
  <argument>DV.arg1</argument>
  ...
  <argument>DV.argn</argument>
</value>
A datatype wrapper is defined by the type and a number of arguments that define the value, e.g., xsd#date(2005,12,12) for December 12, 2005 (and thus the value of type date has three arguments). In case there is just on argument, the element <argument> is optional and the value can be given as above for IRI, string, integer, decimal.
WSML Variable T (
  V
)
T (
  V
)
<value>
  <variable name="V"/>
</value>
 
WSML Relation T (
(Name,ann,relationID,parameter)relation
)
T (
relation Name / n (paramtype1,...,paramtypem)
  subRelationOf {C1,...,Ck}
  annotations
)
<relation name="Name" arity="n">
  <parameters>
    T(paramtype1>)
    ...
    T(paramtypen)
  </parameters>
  <superRelation>C1</superRelation>
  ...
  <superRelation>Ck</superRelation>
  T(annotations)
</relation>
Note that the parameters of a relation are ordered and thus the order of the parameters elements in the XML representation is important. ann is a set of WSML annotations represented using surface syntax as annotations, relationID is a set of (super-)relation identifiers represented using the surface syntax as C1,...,Cn, parameter is a vector of WSML parameter definitions represented using the surface syntax as paramtype1 ...paramtypen
WSML Parameter Definition T (
(ann,defType,domainID)pd
)
T (
ofType {C1,...,Cn}
  annotations
)
<parameter type="constraining">
  <range>C1</range>
  ...
  <range>Cn</range>
  T(annotations)
</parameter>
ann is a set of WSML annotations represented using surface syntax as annotations, defType is ofType, domainID is a set of concept identifiers represented using the surface syntax as C1,...,Cn
WSML Parameter Definition T (
(ann,defType,domainID)pd
)
T (
impliesType {C1,...,Cn}
  annotations
)
<parameter type="inferring">
  <range>C1</range>
  ...
  <range>Cn</range>
  T(annotations)
</parameter>
ann is a set of WSML annotations represented using surface syntax as annotations, defType is impliesType, domainID is a set of concept identifiers represented using the surface syntax as C1,...,Cn
WSML Relation Instance T (
(Name,ann,relationID,parVal)ri
)
T (
relationInstance Name B
(value1,...,valuen)
  annotations
)
<relationInstance name="Name">
  <memberOf>B</memberOf>
  T(value1)
    ...
  T(valuen)
  T(annotations)
</relationInstance>
ann is a set of WSML annotations represented using surface syntax as annotations, relationID is a set of impliesType, domainID is a set of concept identifiers represented using the surface syntax as C1,...,Cn
WSML Parameter Values T (
(ann,valueID)pv
)
T (
{value1,...,valuen} )
<parameterValue>
  T(value1)
  ...
  T(valuen)
</parameterValue>
Note that the parameters of a relationInstance are ordered and thus the order of the value elements is important. ann is a set of WSML annotations represented using surface syntax as annotations, defType is impliesType, domainID is a set of concept identifiers represented using the surface syntax as value1,...,valuen
WSML Axiom T (
(Name,ann,logExp)axiom
)
T (
axiom Name
  axiomdefinition
)
<axiom name="Name">
  T(axiomdefinition)
  T(annotations)
</axiom>
ann is a set of WSML annotations represented using surface syntax as annotations, defType is impliesType, domainID is a set of concept identifiers represented using the surface syntax as value1,...,valuen
WSML Logical Expression T (
(logExp)
)
T (
  annotations
  definedBy
    log_expr
)
T(annotations)
<definedBy>
  T(log_expr)
</definedBy>
The mapping of logical expressions is defined in Table 2.2.
WSML Goal T (
(Name,ann,ontID,medID,nfp,ontID,capability,interface)goal
)
T (
goal A
  header1
  ...
  headern
  nfp1
  ...
  nfpn
  capability
  interface1
  ...
  interfacen
)
<goal name="A">
  T(header1)
  ...
  T(headern)
  T(nfp1)
  ...
  T(nfpn)
  T(capability)
  T(interface1)
  ...
  T(interfacen)
</goal>
header1,...,headern are header elements that contain elements from annotations, ontology identifiers (imported ontologies) and ooMediators identifiers sets denoted by: ann,ontID,medID; nfp is a set of nonfunctional properties represented using the surface syntax as nfp1,...,nfpn, capability is a WSML capability represented using the surface syntax as capability, interface is a set of WSML interfaces represented using the surface syntax as interface1,...,interfacen
WSML ooMediator T (
(Name,ann,ontID,nfp,sourceID,targetID,serviceID)goal
)
T (
ooMediator A
  annotations
  importsontology
  nfp1
  ...
  nfpn
  source
  target
  use_service
)
<ooMediator name="A">
  T(annotations)
  T(importsontology)
  T(nfp1)
  ...
  T(nfpn)
  T(source)
  T(target)
  T(use_service)
</ooMediator>
annotations and importsontology correspond to sets ann respectively ontID; ontology_element1,...,ontology_elementn are ontology elements from the sets: concept, relation,instance,relInstance,axiom
WSML ggMediator T (
(Name,ann,ontID,medID,nfp,sourceID,targetID,serviceID)ggm
)
T (
ggMediator A
  header1
  ...
  headern
  nfp1
  ...
  nfpn
  source
  target
  use_service
)
<ggMediator name="A">
  T(header1)
  ...
  T(headern)
  T(nfp1)
  ...
  T(nfpn)
  T(source)
  T(target)
  T(use_service)
</ggMediator>
header1,...,headern are header elements that contain elements from annotations, ontology identifiers (imported ontologies) and ooMediators identifiers sets denoted by: ann,ontID,medID; nfp1,...,nfpnn are nonfunctional properties from the set nfp, source and target are goal and ggMediator identifiers from the sets sourceID and targetID, use_service are goal, Web service and wwMediator identifiersfrom the set serviceID
WSML wgMediator T (
(Name,ann,ontID,medID,nfp,sourceID,targetID,serviceID)wgm
)
T (
wgMediator A
  header1
  ...
  headern
  nfp1
  ...
  nfpn
  source
  target
  use_service
)
<wgMediator name="A">
  T(header1)
  ...
  T(headern)
  T(nfp1)
  ...
  T(nfpn)
  T(source)
  T(target)
  T(use_service)
</wgMediator>
 
WSML wwMediator T (
(Name,ann,ontID,medID,nfp,sourceID,targetID,serviceID)wwm
)
T (
wwMediator A
  header1
  ...
  headern
  nfp1
  ...
  nfpn
  source
  target
  use_service
)
<wwMediator name="A">
  T(header1)
  ...
  T(headern)
  T(nfp1)
  ...
  T(nfpn)
  T(source)
  T(target)
  T(use_service)
</wwMediator>
 
  T (
sourceID
)
T (
  source { A1,...,An }
)
  <source>A1</source>
  ...
  <source>An</source>
 
  T (
targetID
)
T (
  target A
)
  <target>A</target>  
  T (
serviceID
)
T (
  usesService A
)
  <usesService>A</usesService>  
WSML Web Service T (
(Name,ann,ontID,medID,nfp,capability,interface)ws
)
T (
webService A
  header1
  ...
  headern
  nfp1
  ...
  nfpn
  capability
  interface1
  ...
  interfacen
)
<webService name="A">
  T(header1)
  ...
  T(headern)
  T(nfp1)
  ...
  T(nfpn)
  T(capability)
  T(interface1)
  ...
  T(interfacen)
</webService>
 
WSML Capability T (
(Name,ann,ontID,medID,nfp,sharedVar,pre,post,ass,eff)capability
)
T (
capability C
  header1
  ...
  headern
  nfp1
  ...
  nfpn
  sharedvardef
  pre_post_ass_or_eff1
  ...
  pre_post_ass_or_effn
)
<capability name="C">
  T(header1)
  ...
  T(headern)
  T(nfp1)
  ...
  T(nfpn)
  T(sharedvardef)
  T(pre_post_ass_or_eff1)
  ...
  T(pre_post_ass_or_effn)
</capability>
pre_post_ass_or_eff unites the axiom definitions for precondition, assumption, postcondition and effect.
  T (
sharedVar
)
T (
sharedVariables {?v1, ..., ?vn}
)
<sharedVariables>
  <variable name="?v1"/>
  ...
  <variable name="?vn"/>
</sharedVariables>
 
  T (
pre
)
T (
precondition B
  axiomdefinition
)
<precondition name="B">
  T(axiomdefinition)
</precondition>
 
  T (
ass
)
T (
assumption B
  axiomdefinition
)
<assumption name="B">
  T(axiomdefinition)
</assumption>
 
  T (
post
)
T (
postcondition B
  axiomdefinition
)
<postcondition name="B">
  T(axiomdefinition)
</postcondition>
 
  T (
eff
)
T (
effect B
  axiomdefinition
)
<effect name="B">
  T(axiomdefinition)
</effect>
 
WSML Interface T (
(Name,ann,ontID,medID,nfp,chor,orchID)interface
)
T (
interface A
  header1
  ...
  headern
  nfp1
  ...
  nfpn
  choreography
  orchestration
)
<interface name="A">
  T(header1)
  ...
  T(headern)
  T(nfp1)
  ...
  T(nfpn)
  T(choreography)
  T(orchestration)
</interface>
 
WSML Choreography T (
(Name,ann,ontID,medID,nfp,signature,rule)choreography
)
T (
choreography C
  header1
  ...
  headern
  statesignature
  transitions
)
<choreography name="C">
  T(header1)
  ...
  T(headern)
  T(statesignature)
  T(transitions)
</choreography>
rule is a set of WSML rules represented using surface syntax as transitions, where a WSML rule can be an if rule, forall rule, choose rule, piped rule, add rule, delete rule
WSML State Signature T (
(Name,ann,ontID,medID,nfp,mode)ss
)
T (
statesignature C
  header1
  ...
  headern
  mode1
  ...
  moden
)
<statesignature name="C">
  T(header1)
  ...
  T(headern)
  T(mode1)
  ...
  T(moden)
</statesignature>
 
WSML Mode T (
(type,conceptID,groundingID)cm
)
T (
type
concept A
grounding
)
<mode>
  T(type)
  <concept/>
  <iri>A</iri>
  T(grounding)
</mode>
 
WSML Mode T (
(type,conceptID,groundingID)rm
)
T (
type
relation A
grounding
)
<mode>
  T(type)
  <relation/>
  <iri>A</iri>
  T(grounding)
</mode>
 
  T (
type
)
T (
static
)
<static/>  
  T (
type
)
T (
in
)
<in/>  
  T (
type
)
T (
out
)
<out/>  
  T (
type
)
T (
shared
)
<shared/>  
  T (
type
)
T (
controlled
)
<controlled/>  
  T (
grounding
)
T (
grounding {A1,...,An}
)
<grounding>A1</grounding>
...
<grounding>An</grounding>
 
WSML Transition Rule T (
(logExp,rule)if
)
T (
  if
  condition
  then
  rule1
  ...
  rulen
  endif
)
<rule>
  <if/>
  T(condition)
  <then/>
  T(rule1)
  ...
  T(rulen)
  <endif/>
</rule>
rule is a set of WSML transition rules expressed using the surface syntax as: rule1,...,rulen and logExp is a WSML logical expression expressed using the surface syntax as condition
WSML Transition Rule T (
(varID,logExp,rule)forall
)
T (
  forall
  variable1
  ...
  variablen
  with
  condition
  do
  rule1
  ...
  rulen
  endforall
)
<rule>
  <forall/>
  T(variable1)
  ...
  T(variablen)
  <with/>
  T(condition)
  <do/>
  T(rule1)
  ...
  T(rulen)
  <endforall/>
</rule>
varID is a set of variable identifiers expressed using the surface syntax as: variable1,...,variablen, rule is a set of WSML transition rules expressed using the surface syntax as: rule1,...,rulen and logExp is a WSML logical expression expressed using the surface syntax as: condition
WSML Transition Rule T (
(varID,logExp,rule)choose
)
T (
  choose
  variable1
  ...
  variablen
  with
  condition
  do
  rule1
  ...
  rulen
  endchoose
)
<rule>
  <choose/>
  T(variable1)
  ...
  T(variablen)
  <with/>
  T(condition)
  <do/>
  T(rule1)
  ...
  T(rulen)
  <endchoose/>
</rule>
varID is a set of variable identifiers expressed using the surface syntax as: variable1,...,variablen, rule is a set of WSML transition rules expressed using the surface syntax as: rule1,...,rulen and logExp is a WSML logical expression expressed using the surface syntax as condition
WSML Transition Rule T (
(rule)piped
)
T (
  rule1|   ... |rulen
)
<rule>
  T(rule1) <pipe/>   ... <pipe/> T(rulen)
</rule>
 
WSML Transition Rule T (
(fact)add
)
T (
  add
  fact
)
<rule>
<add/>
  T(fact)
</rule>
fact is a ground atomic fomula
WSML Transition Rule T (
(fact)delete
)
T (
  delete
  fact
)
<rule>
<delete/>
  T(fact)
</rule>
fact is a ground atomic fomula
WSML Orchestration T (
orchestration
)
T (
orchestration A
)
<orchestration>A</orchestration>  
WSML Nonfunctional Property T (
(name, ann, value, logExp)nfp
)
T (
nonFunctionalProperty
  annotations
  name hasValue {value1, ..., valuen}
  log_definition
)
<nonFunctionalProperty name="name">
  T(annotations)
  T(value1)
  ...
  T(valuen)
  T(log_definition)
</nonFunctionalProperty>
 
WSML Logical Definition T (
logDefinition
)
T (
definedBy
  log_expr1, ...,   log_exprn
)
<logicalDefinition>
  <definedBy>
   T(log_expr1)
   ...
   T(log_exprn)
  </definedBy>
</logicalDefinition>
 
WSML Annotations T (
(name, value)ann
)
T (
annotations
  attributevalue1
  ...
  attributevaluen
endAnnotations
)
<annotations>
  T(attributevalue1)
  ...
  T(attributevaluen)
</annotations>
 
  T (
ontID
)
T (
importsOntology { A1,...,An}
)
<importsOntology>A1</importsOntology>
...
<importsOntology>An</importsOntology>
 
  T (
medID
)
T (
usesMediator {B1,...,Bn}
)
<usesMediator>B1</usesMediator>
...
<usesMediator>Bn</usesMediator>
 

The logical expression syntax is explained in Table 2.2. In the table, A stands for identifiers and T1,...,Tn stand for terms. V stands for a variable.

Table 2.2: Mapping the WSML logical expression syntax to the WSML/XML syntax
WSML Abstract syntax WSML Surface syntax XML Tree Remarks
WSML Predicate T' (
A(term1, ..., termn)
)
T' (
A(term1, ..., termn)
)
<term name="A">
  T' (term1, arg)
  ...
  T' (termn, arg)
</term>
 
WSML Term T' (
V
)
T' (
V
)
<term name="V"/>  
WSML Atom T (
A(term1, ..., termn)
)
T (
A(term1, ..., termn)
)
<atom name="A">
  T'(term1, arg)
  ...
  T'(termn, arg)
</atom>
 
true T (
T
)
T (
true
)
<true/>  
false T (

)
T (
false
)
<false/>  
equal T (
T1 = T2
)
T (
T1 equal T2
)
<equal>
  T'(T1)
  T'(T2)
</equal>
 
subConceptOf T (
T1 :: T2,...,Tn
)
T (
T1 subConceptOf T2,...,Tn
)
<molecule>
  T'(T1)
  <isa type="subConceptOf">
    T'(T2)
    ...
    T'(Tn)
  </isa>
</molecule>
 
memberOf T (
T1 : T2,...,Tn
)
T (
T1 memberOf T2,...,Tn
)
<molecule>
  T'(T1)
  <isa type="memberOf">
    T'(T2)
    ...
    T'(Tn)
  </isa>
</molecule>
 
  T (
T [attr_relation1, ..., attr_relationn]
)
T (
T [attr_relation1, ..., attr_relationn]
)
<molecule>
  T'(T)
  T(attr_relation1)
  ...
  T(attr_relationn)
</molecule>
 
ofType T (
T0 ot {T1, ..., Tn}
)
T (
T0 ofType {T1, ..., Tn}
)
<attributeDefinition type="constraining">
  T'(T0, name)
  T'(T1, type)
  ...
  T'(Tn, type)
</attributeDefinition>
 
impliesType T (
T0 it {T1, ..., Tn}
)
T (
T0 impliesType {T1, ..., Tn}
)
<attributeDefinition type="inferring">
  T'(T0, name)
  T'(T1, type)
  ...
  T'(Tn, type)
</attributeDefinition>
 
hasValue T (
T0 hv {T1, ..., Tn}
)
T (
T0 hasValue {T1, ..., Tn}
)
<attributeValue>
  T'(T0, name)
  T'(T1, value)
  ...
  T'(Tn, value)
</attributeValue>
 
and T (
expr1 /\ expr2
)
T (
expr1 and expr2
)
<and>
  T(expr1)
  T(expr2)
</and>
 
or T (
expr1 \/ expr2
)
T (
expr1 or expr2
)
<or>
  T(expr1)
  T(expr2)
</or>
 
neg T (
¬ expr
)
T (
neg expr
)
<neg>
  T(expr)
</neg>
 
naf T (
not expr
)
T (
naf expr
)
<naf>
  T(expr)
</naf>
 
implies T (
expr1 expr2
)
T (
expr1 implies expr2
)
<implies>
  T(expr1)
  T(expr2)
</implies>
 
impliedBy T (
expr1 expr2
)
T (
expr1 impliedBy expr2
)
<impliedBy>
  T(expr1)
  T(expr2)
</impliedBy>
 
equivalent T (
expr1 expr2
)
T (
expr1 equivalent expr2
)
<equivalent>
  T(expr1)
  T(expr2)
</equivalent>
 
forall T (
?v1, ..., ?vn ( expr )
)
T (
forall ?v1, ..., ?vn ( expr )
)
<forall>
  <variable name="?v1"/>
  ...
  <variable name="?vn"/>
  T(expr)
</forall>
 
exists T (
?v1, ..., ?vn ( expr )
)
T (
exists ?v1, ..., ?vn ( expr )
)
<exists>
  <variable name="?v1"/>
  ...
  <variable name="?vn"/>
  T(expr)
</exists>
 
constraint T (
expr ⊃ ⊥
)
T (
!- expr
)
<constraint>
  T(expr)
</constraint>
 
impliedByLP T (
expr2 expr1
)
T (
expr1 :- expr2
)
<impliedByLP>
  T(expr1)
  T(expr2)
</impliedByLP>
 

Table 2.3 provides a simple translation example.

Table 2.3: A Mapping Example
WSML syntax XML Tree

wsmlVariant
  _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight"

namespace {_"http://www.example.org/ex1#",
    dc _"http://purl.org/dc/elements/1.1#",
    wsml _"http://www.wsmo.org/wsml/wsml-syntax#",
    ex _"http://www.example.org/ex2#"}

ontology _"http://www.example.org/ex1"
    annotations
        dc#title hasValue "WSML to RDF"
        dc#date hasValue _date(2005,12,12)
    endAnnotations

    importsOntology _"http://www.example.net/ex2"

    concept Woman subConceptOf
            {ex#Human, ex#LivingBeing}
        name ofType _string
        ancestorOf transitive impliesType ex#Human
        age ofType (1) _integer

    axiom GenderConstraint
        definedBy
              !- ?x memberOf ex#Man and
                ?x memberOf Woman.

    instance Mary memberOf Woman
        name hasValue "Mary Jones"
        age hasValue 23

    relation childOf
        (ofType ex#Human, impliesType ex#Parent)


webService ws
    capability itineraryInfo
    interface
      {_"http://example.org/i1",_"http://example.org/i2"}

<wsml xmlns="http://www.wsmo.org/wsml/wsml-syntax#"
      variant="http://www.wsmo.org/wsml/wsml-syntax/wsml-flight">
  <ontology name="http://www.example.org/ex1">
    <annotations>
      <attributeValue name="http://purl.org/dc/elements/1.1#title">
        <value type="http://www.wsmo.org/wsml/wsml-syntax#string">
          WSML to RDF
        </value>
      </attributeValue>
      <attributeValue name="http://purl.org/dc/elements/1.1#date">
        <value type="http://www.wsmo.org/wsml/wsml-syntax#date">
          <argument>2005</argument>
          <argument>12</argument>
          <argument>12</argument>
        </value>
      </attributeValue>
    </annotations>
    <importsOntology>http://www.example.org/ex2</importsOntology>
    <concept name="http://www.example.org/ex1#Woman">
      <superConcept>
        http://www.example.org/ex2#Human
      </superConcept>
      <superConcept>
        http://www.example.org/ex2#LivingBeing
      </superConcept>
      <attribute name="http://www.example.org/ex1#name" type="constraining">
        <range>http://www.wsmo.org/wsml/wsml-syntax#string</range>
      </attribute>
      <attribute name="http://www.example.org/ex1#ancestor" type="inferring">
        <range>http://www.example.org/ex2#Human</range>
        <transitive/>
      </attribute>
      <attribute name="http://www.example.org/ex1#age" type="inferring">
        <range>http://www.wsmo.org/wsml/wsml-syntax#integer</range>
        <minCardinality>1</minCardinality>
        <maxCardinality>1</maxCardinality>
      </attribute>
    </concept>
    <axiom name="http://www.example.org/ex1#GenderConstraint">
      <definedBy>
        <constraint>
          <and>
             <molecule>
               <term name="?x"/>
               <isa type="memberOf">
                 <term name="http://www.example.org/ex1#Woman"/>
               </isa>
             </molecule>
             <molecule>
               <term name="?x"/>
               <isa type="memberOf">
                 <term name="http://www.example.org/ex2#Man"/>
               </isa>
             </molecule>
          </and>
        </constraint>
      </definedBy>
    </axiom>
    <instance name="http://www.example.org/ex1#Mary">
      <memberOf>http://www.example.org/ex1#Woman</memberOf>
      <attributeValue name="http://www.example.org/ex1#name">
        <value type="http://www.wsmo.org/wsml/wsml-syntax#string">
          Mary Jones
        </value>
      </attributeValue>
      <attributeValue name="http://www.example.org/ex1#age">
        <value type="http://www.wsmo.org/wsml/wsml-syntax#integer">
          23
        </value>
      </attributeValue>
    </instance>
    <relation name="http://www.example.org/ex1#childOf">
      <parameters>
        <parameter type="constraining">
          <range>http://www.example.org/ex2#Human</range>
        </parameter>
        <parameter type="inferring">
          <range>http://www.example.org/ex2#Parent</range>
        </parameter>
      </parameters>
    </relation>
  </ontology>
  <webService name="http://www.example.org/ex1#ws">
    <capability name="http://www.example.org/ex1#itineraryInfo"/>
    <interface name="http://example.org/i1</interface"/>
    <interface name="http://example.org/i2</interface"/>
  </webService>
</wsml>

References

[RIF-BLD] H. Boley & M. Kifer, (Eds.). RIF Basic Logic Dialect, W3C Working Draft. Available from http://www.w3.org/TR/rif-bld/..

[RIF-FLD] H. Boley & M. Kifer, (Eds.). RIF Framework for Logic Dialects, W3C Working Draft. Available from http://www.w3.org/TR/rif-fld/.

[WSML] N. Steinmetz and I. Toma , editors. The Web Service Modeling Language WSML. 2008. WSML Working Draft D16.1v1.0 http://www.wsmo.org/TR/d16/d16.1/v1.0/.

[WSML-Semantics] J. de Bruijn, editor. WSML Abstract Syntax and Semnatics. 2008. WSML Working Draft D16.3v1.0 http://www.wsmo.org/TR/d16/d16.3/v1.0/.


Acknowledgements

The work is partially funded by the European Commission under the projects ASG, EASAIER, enIRaF, Knowledge Web, Musing, Salero, Seemp, Semantic- GOV, Super, SWING and TripCom; by Science Foundation Ireland under the DERI-Lion Grant No.SFI/02/CE1/I13; by the FIT-IT (Forschung, Innovation, Technologie - Informationstechnologie) under the projects Grisino, RW2, Sem-Biz, SeNSE and TSC.

The authors would like to thank to all the members of the WSML working group for their advice and input into this document.


Valid XHTML 1.1!

$Date: 2008-07-28 14:21:56 $