- From: Daniel Elenius <daele@ida.liu.se>
- Date: Mon, 11 Jul 2005 11:34:27 +0200
- To: David Martin <martin@AI.SRI.COM>, public-sws-ig@w3.org
> 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).
A clarification here: As I understand it, the XSLT engines allow the
parameter values to be passed programmatically. So, it's not a matter of
"preprocessing", if by that you mean somehow rewriting the XSLT. It is
simply a matter of the execution engine needing to know what values to
pass to these XSLT params.
>
> 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.
Clarification: "Values contained in" here means "values connected to the
#Book instance through various properties (hasAuthor, etc)".
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")
I.e. for the default namespace of the ontology containing the definitions
below.
> "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>
You need a '/' at the end above.
> <g:wsdlInput>
The two properties above should be at the same level of indentation
(they're not in my MUA at least), just to avoid confusion.
> <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
Not to the grounding ontology but to the Expression ontology, I think.
> was mentioned at the beginning of this message). This will be
> described in a separate message.
>
> Regards,
> David
>
>
Received on Monday, 11 July 2005 09:35:05 UTC