Hi Christian,

I think your mapping into the SPIN template looks correct, but I am  
unsure about the semantics of your queries:

> Here is the working Query:
>       ASK WHERE {
>           ?this stockdb:location_CITY ?arg3 .
>           ?this stockdb:location_COUNTRY ?arg4 .
>           FILTER (spl:hasValue(?this, stockdb:location_CITY, "Las Vegas")
> && (!spl:hasValue(?this, stockdb:location_COUNTRY, "USA"))) .
>       }

This one says that as long as ?this has any value (?arg3 and ?arg4)  
for the two properties, then the FILTER must be false to satisfy the  
constraint. For example, this will return OK if no value is present  
for either property.

>
>
> Here is the template version that doesn't work:
>
> spin:body
>       ASK WHERE {
>           ?this ?arg1 ?arg3 .
>           ?this ?arg2 ?arg4 .
>           FILTER (spl:hasValue(?this, ?arg1, ?arg3) && (!spl:hasValue(?
> this, ?arg2, ?arg4))) .
>       }
>
> spin:constraints
>       Argument sp:arg1 : rdf:Property
>       Argument sp:arg2 : rdf:Property
>       Argument sp:arg3 : xsd:string
>       Argument sp:arg4 : xsd:string

Now you are querying against specific values of those properties. This  
might fail for example if the literals have language tags associated  
with them.

If you have an example file with the data then I could have a look  
(off-list).

Regards,
Holger


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to