- From: David Martin <martin@AI.SRI.COM>
- Date: Sun, 03 Jul 2005 07:36:31 -0700
- To: public-sws-ig <public-sws-ig@w3.org>
This message is meant to summarize new directions regarding the grounding part of OWL-S. These new directions will show up in OWL-S 1.2, subject of course to any further evolution that results from discussion on this list. These directions have arisen from discussions within the OWL-S Coalition. (Evren, Naveen, Massimo and Daniel and all please check me on this message and feel free to chime in if anything needs further clarification). The first thing to note is that these new directions do not involve any ontology changes (except for one minor exception that's noted near the end of this message). Rather they involve new conventions regarding the relationship between the parameters and preconditions of atomic processes and the WSDL script specified by a grounding. The second thing to note is that here we are dealing with the case where an XSLT script is used to generate an input message for a WSDL operation. (There are a couple other cases that aren't addressed in this message.) In the past we assumed that the input to the WSDL script was some atomic process input expressed in OWL (i.e., as an OWL instance expressed in the XML/RDF syntax). That assumption had some problems, so now the new approach is to pass values into the WSDL script by means of variable / param bindings. Specifically, variables that appear in an atomic process precondition get bound to values when that precondition is evaluated, and those values also get bound to params that appear in an XSLT script. The XSLT script then can produce a WSDL input message that includes those values. The precondition should be arranged so that all values required by the XSLT script are assigned either to input parameters or to local variables of the atomic process. XSLT params should be defined using the URIs of the required input parameters and local variables, as illustrated in the example below. We note that the binding of the XSLT params will not come "for free"; that is, XSLT software will not know where to get those values from. That binding will need to be done by the execution environment (e.g., by preprocessing the XSLT script before it is evaluated). OWL-S allows that preconditions can be expressed in a variety of logic languages, including e.g. SWRL, DRS, RDQL, SPARQL, and KIF. Here's an example that employes SWRL. The thing to notice about this example is simply that evaluation of this precondition binds local variables #Firstname, #Lastname, and #Title to values contained in the input #Book. These same values are then plugged in to the XSLT script (as xsl:params) when it gets processed. The precondition is the following query expressed in SWRL: (?Book :hasAuthor ?Author) (?Author :hasFirstname ?Firstname) (?Author :hasLastname ?Lastname) (?Book :hasTitle ?Title) Also note that the grounding is still based on WSDL 1.1 (hence the reference to wsdlMessagePart), but this will be updated soon. ===== BEGIN EXAMPLE <!-- For simplicity we omit the definitions of Book, Firstname, Lastname, Title "congo" is the namespace prefix for the example ("http://www.example.org/congo") "congo_wsdl" is the namespace prefix for the WSDL spec "p" is the namespace prefix for owl-s/1.2/Process.owl "e" is the namespace prefix for owl-s/1.2/generic/Expression.owl "e" is the namespace prefix for owl-s/1.2/Grounding.owl --> <p:AtomicProcess rdf:ID="BookInfo"> <p:hasInput rdf:resource="#Book"> <p:hasLocal rdf:resource="#Firstname"> <p:hasLocal rdf:resource="#Lastname"> <p:hasLocal rdf:resource="#Title"> <p:hasPrecondition> <e:Expression> <e:expressionObject parsetype="Collection"> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="publ:hasAuthor"/> <swrl:argument1 rdf:resource="#Book"/> <swrl:argument2 rdf:resource="#Author"/> </swrl:IndividualPropertyAtom> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="publ:hasFirstname"/> <swrl:argument1 rdf:resource="#Author"/> <swrl:argument2 rdf:resource="#Firstname"/> </swrl:IndividualPropertyAtom> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="publ:hasFirstname"/> <swrl:argument1 rdf:resource="#Author"/> <swrl:argument2 rdf:resource="#Lastname"/> </swrl:IndividualPropertyAtom> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="publ:hasTitle"/> <swrl:argument1 rdf:resource="#Book"/> <swrl:argument2 rdf:resource="#Title"/> </swrl:IndividualPropertyAtom> </e:expressionObject> </e:Expression> </e:hasPrecondition> </e:AtomicProcess> <g:WsdlAtomicProcessGrounding> <g:owlsProcess rdf:resource="#BookInfo> <g:wsdlInput> <g:XSLTInputMessageMap> <grounding:wsdlMessagePart rdf:datatype="&xsd;#anyURI"> congo_wsdl:BookInfoMessagepart </grounding:wsdlMessagePart> <g:xsltTransformationString> <![CDATA[ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:congo="http://www.example.org/congo"> <xsl:param name="congo:Firstname"/> <xsl:param name="congo:Lastname"/> <xsl:param name="congo:Title"/> <xsl:template match="/"> <Book> <author> <xsl:value-of select="$congo:Firstname"/> <xsl:value-of select="$congo:Lastname"/> </author> <title> <xsl:value-of select="$congo:Title"/> </title> </Book> </xsl:template> </xsl:stylesheet> ]]> </g:xsltTransformationString> </g:XSLTInputMessageMap> </g:wsdlInput> </g:WsdlAtomicProcessGrounding> ===== END EXAMPLE Final note: In SWRL and DRS the input parameters and local parameters can be mentioned by their URI. But that isn't true of SPARQL, RDQL, and KIF. When one of those languages is used a mapping is needed that explicitly shows the correspondence between atomic process variables and the corresponding variables mentioned in the precondition. This requires a minor extension to the existing grounding ontology (which was mentioned at the beginning of this message). This will be described in a separate message. Regards, David
Received on Sunday, 3 July 2005 14:36:43 UTC