Any help on the following problem would be appreciated:
If I define a template to be:
( deftemplate templateName
( slot One )
( slot Two )
)
How can I get information about the slots from a rule?
e.g. The following do not work, but are my attempts at
describing the desired behavour...
Attempt 1:
Match the contents of the template and print the list to stdout...
(defrule ruleName1
( templateName $?contents)
=>
(printout t ?contents)
)
Attempt 2:
Get the factId from any asserted fact that is related to templateName
and somehow use the factId to get access to the slot named Two...
(defrule ruleName2
?factId <- ( templateName )
=>
(printout t ?factId.Two )
)
Cheers,
Alan.
begin: vcard
fn: Alan Barton
n: Barton;Alan
org: National Research Council,
adr: ;;;Ottawa;;;Canada
email;internet: [EMAIL PROTECTED]
tel;work: 613-993-8562
note: <A HREF="http://ai.iit.nrc.ca/IR_public/people/students/alan.html">Co-op Student</A>
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard