Hi all, I'm a relative newbie to Jess since,I've worked previously with CLIPS for a year, but using plain deftemplates (no nested objects). I'm actually evaluating using Jess but I'm a bit disoriented about how to write patterns that match complex nested objects/facts (with Lists and Maps) as those my KB would have. I've read the Manual, studied the examples and also read many archived threads of this mailing list concerning this issues (Detecting changes in nested Objects, Working with collections, RDF...), which have been quite instructive, but are beyond my actual point
I've tried the simplified example that follows and it works but I wonder if is there better ways to achieve it (mapping objects to a plain templates, RDF...), as long as the nesting level increase the rules get uglier... Regards Rodolfo Martin (deftemplate Address (slot street (type STRING)) (slot number (type INTEGER)) ) (deftemplate Complex (slot name (type STRING)) (slot address) ) (defrule matchFredsfromRedStreet (Complex (name ?n&"Fred")(address ?a&:(eq (fact-slot-value ?a street) "Red"))) => (printout t "Fred lives at number " (fact-slot-value ?a number) crlf) ) ________________________________________________ WebMail - movilab.net Telefsnica Msviles Espaqa -------------------------------------------------------------------- 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] --------------------------------------------------------------------