On 10/26/06, gomez
<[EMAIL PROTECTED]> wrote:
Ok,but how do I define the rules?
I mean, a dom document doesn't have fields,right?
So,if I want to define a rule like:
rule "Hello World"
when
m : Message( status == Message.HELLO , message : message )
then
System.out.println( message );
m.setMessage( "Goodbye cruel world" );
m.setStatus( Message.GOODBYE );
modify( m );
end
Where instead of having a class Message with fields named "status" and
"message" I have a dom document with those informations somewhere in it,how
do I do?
I'm doing it defining a new class Message and building object of this class
with values obtained from the XML with xerces.Then I define rules on those
objects,and,finally,go all the way back to the XML file.
Is this way stupid?Is there a smarter one?
you can pass in a Dom object as a fact.
--
View this message in context: http://www.nabble.com/Xml-rules-tf2465548.html#a7012874
Sent from the drools - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
