I think Mahesh Gandhe wrote: > > Hi, > I have one query . > > My requirement of the pattern in Rules is as follows > > (defrule inverseof > > (?x http://www.daml.org/2001/03/daml+oil#inverseOf ?y) >
There are two problems here. First, the "head" (what you've written as ?x) of a fact must be a symbol. It can't be a variable. Such a thing might be possible in Jess version 7, but that's quite a ways off. The other problem which will show up as soon as you fix this one, is that ":" is a special character in Jess; you're going to need to write URLs as quoted strings, not as symbols the way you have here. > Is there any solution for it? Yes; pick a generic word like "fact" or "data" and use it as the head of all your facts; then write the above as (data ?x "http://..." ?y) etc. --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 Org. 8920, MS 9012 [EMAIL PROTECTED] PO Box 969 http://herzberg.ca.sandia.gov Livermore, CA 94550 -------------------------------------------------------------------- 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] --------------------------------------------------------------------
