Consider the foll. facts in the KB:
404: (MAIN::PropertyValue
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
cmu-inst:CSCE531_Compiler_Construction
cmu-ri-cou:Course)
421: (MAIN::PropertyValue
cmu-ri-cou:hasInstructor
cmu-inst:CSCE531_Compiler_Construction
cmu-inst:Fenner_S)
420: (MAIN::PropertyValue
cmu-ri-peo:hasHomeURL
cmu-inst:Fenner_S
cmu-inst:anonARP71)
419: (MAIN::PropertyValue
http://www.w3.org/1999/02/22-rdf-syntax-ns#value
cmu-inst:anonARP71
"ABC")
Here is a query to find the Course Instructor that has a
homeURL "ABC"
Query 1:
========
(defquery search
(declare (max-background-rules 100))
(PropertyValue
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
?n
cmu-ri-cou:Course)
(PropertyValue
cmu-ri-cou:hasInstructor
?n
?res)
(PropertyValue
cmu-ri-peo:hasHomeURL
?res
?y)
(PropertyValue
http://www.w3.org/1999/02/22-rdf-syntax-ns#value
?y
?s&:(= (str-compare ?s ABC) 0)) )
This works fine. I am using Jess 6.1p2, and when I execute the query,
I get one match for cmu-inst:Fenner_S.
Let us replace the value "ABC" by an actual URL such as
"http://www.cse.sc.edu/~fenner/", as in the foll fact:
419: (MAIN::PropertyValue
http://www.w3.org/1999/02/22-rdf-syntax-ns#value
cmu-inst:anonARP71
"http://www.cse.sc.edu/~fenner/")
When I run the foll. query:
(defquery search
(declare (max-background-rules 100))
(PropertyValue
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
?n
cmu-ri-cou:Course)
(PropertyValue
cmu-ri-cou:hasInstructor
?n
?res)
(PropertyValue
cmu-ri-peo:hasHomeURL
?res
?y)
(PropertyValue
http://www.w3.org/1999/02/22-rdf-syntax-ns#value
?y
?s&:(= (str-compare ?s http://www.cse.sc.edu/~fenner/) 0)) )
It returns 0 results. This is essentially the same as query 1
except the
ABC in the test condition (last line) is replaced by
http://www.cse.sc.edu/~fenner/
I am not sure what the problem is. Does it have something to do with
the ~ or / in the literal value.
Thanks in advance.
Kapil Dukle
University of South Carolina
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------