Niloy,
I think there maybe a confusion here. You can create the full descriptor
tree without any problems, since that's what the parser does. Just create
the AND tree for the LHS and set it to your RuleDescr and after that add it
to the PackageDescr.
When in doubt, look at what the parser does. Here you can see the ANTLR
grammar for DRL files:
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-compiler/src/m...
Hope it helps.
[]s
Edson
2007/5/18, Niloy Debnath <niloy_rcc(a)yahoo.co.in>:
hi ,
i want to convert a DRL file into its equivalent XML file using
JbossRules-3.0.5. i have used two methods for this conversion
Method 1:
In this method i've taken a DRL file as an input and converted it into its
equivalent XML file. i've attached a sample program named FibonacciDrl2Xmlwhich will
help you to understand my first method.
Method 2:
In this method i dont want to take any rule file as an input. i want to
create the rule objects and through dump method of XmlDumper class i want
to convert it into XML
now problem arises here...i can bind the RHS part with PackageDescr but
not the LHS part because we can not bindLiteralDescr,FieldBindingDescr,ColumnDescr etc
with the PackageDescr and
dump method only take PackageDescr object as a parameter.so i've modified
the existing XmlDumper class as per my requirement and converted
HelloWorldExample into its equivalent XML.
i've attached HelloWorldXml file which will give you a clear view about my
program where i created the rule objects and xmlDump which is modified
version of XmlDumper as per my requirement .
now i need to make xmlDump class more generic for method 2. How do i do
that? i've tried lot but i failed. i need your help.
thanking you,
with regards,
Niloy Debnanth
(student)
------------------------------
Here's a new way to find what you're looking for - Yahoo!
Answers<http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yah...
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com