The descr is a string based intermediate API. Its a rough appoximation to the classes rule/spi except each field is just a string. The PackageDescr is then passed to the PackageBuilder which returns a Package. We have aligned Drools 3.0 with Java - RuleSets no longer exist, we just call them Packages. It is possible to go direct to rule/spi - especially if you have no code to compile - but bear in mind that PackageBuilder has a lot of logic to take care of the building and you might end up replicating a lot of it anyway.

Take a look at PackageBuilder and RuleBuilder in drools-compiler.

I would love to have a RuleML driver - but its complex and is marked for after 3.0. So a directly aligned XML was a quick answer to those that still need XML. Also remember that RuleML has some limitations - for instance you can't have freecode in predicates and consequences - instead you can only call functions.

Mark
Michael Neale wrote:
All of the classes in this package represent that for Drools 3:
http://anonsvn.labs.jboss.com/trunk/labs/jbossrules/drools-compiler/src/main/java/org/drools/lang/descr/

The "top" of the object graph is PackageDescr- everything hangs off that.

The challenge is that it is an existing object model. I know JAXB 1 did not
handle those situations. XMLBeans may, don't know much about Eclipse EMF.
Certainly things like xstream can go to XML and back, but they will not
necessarily conform to a schema, which is what we would like.


On 3/20/06, Jayaram C S <[EMAIL PROTECTED]> wrote:
Michael Neale <michael.neale <at> gmail.com> writes:

well going direct from RuleML to the AST may be possible with the right
mapping tools, I am sure (but I am a bit out of touch with those tools).
Going via a "native" XML format may be easier, as it means that
different
versions of RuleML/whatever replaces it can be supported with XSLT,
which
may be easier for people to maintain then direct mappings.

Any XML mapping gurus out there please speak up !


Can you please tell me where to find the Meta data for AST. I will try to
do a
mapping exercise and let you know of the results.
There are quite a few tools available. Mostly based on JAXB & JAXP .
XMLBeans
might be of great help .

Also a possibility is using XSD component of Eclipse Framework (EMF). If
any one
has worked on these, may be they can help.

Jayaram




Reply via email to