<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Niloy,<br>
<br>
I suggest you make a drl first and then look at the AST it creates in
memory and then make sure that the programmatic descr tree you are
making matches that.<br>
<br>
Mark<br>
Niloy Debnath wrote:
<blockquote cite="mid:467143.451.qm@web7909.mail.in.yahoo.com"
type="cite">hi,<br>
<br>
I'm going to convert a <span style="font-weight: bold;">PackageDescr</span>
object which has the rules to <span style="font-weight: bold;">XML</span>
file.I'm trying to convert it into xml using <span
style="font-weight: bold;">dump </span>method of <span
style="font-weight: bold;">XmlDumper</span> class. The problem with
that is while the rest of the code is fine i cannot get the <span
style="font-weight: bold;">lhs part</span>. There is no method in fact
as far as i know to actually specify the lhs. The <span
style="font-weight: bold;">setLhs</span> method does not help in this
regard. I tried to construct all the parameters ususally specified in
the lhs like the <span style="font-weight: bold;">ColumnDescr</span>
object and <span style="font-weight: bold;">FieldBinding</span> object
but there is no way to bind these to the <span
style="font-weight: bold;">PackageDescr</span> object. <br>
So the lhs is coming out as null while the rest of the code is fine
...even the rhs..<br>
<br>
I am attaching the code and the output again. please go through and
advise.<br>
<br>
thanking you,<br>
<br>
<span style="font-weight: bold;">Niloy Debnath</span><br
style="font-weight: bold;">
<span style="font-weight: bold;">student(comp sc & engg)<br>
<br>
<br>
<br>
</span><strong><br>
OUTPUT OF TEST2 :</strong><br>
<div> <font size="2">
<div align="left"><?xml version="1.0" encoding="UTF-8"?> </div>
<div align="left"><package name="org.drools.examples" </div>
<div align="left">xmlns="<a moz-do-not-send="true" rel="nofollow"
target="_blank" href="http://drools.org/drools-3.0">http://drools.org/drools-3.0</a>"
</div>
<div align="left">xmlns:xs="<a moz-do-not-send="true" rel="nofollow"
target="_blank" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"
</div>
<div align="left">xs:schemaLocation="<a moz-do-not-send="true"
rel="nofollow" target="_blank" href="http://drools.org/drools-3.0">http://drools.org/drools-3.0</a>
drools-3.0.xsd"> </div>
<div align="left"><import name="org.drools.examples.Hell.Message"
/> </div>
<div align="left"> <br>
<rule name="Hell"></div>
<div align="left"><lhs>null</div>
<div align="left">null</div>
<div align="left"></lhs><rhs>System.out.println( message
);m.setMessage( "Goodbye cruel world " );m.setStatus( Message.GOODBYE
);modify( m );</rhs></div>
<div align="left"></rule><rule name="Good"></div>
<div align="left"><rule-attribute name="activation-group"
value="dekhajak" /></div>
<div align="left"><lhs><rule-attribute
name="activation-group" value="dekhajak" /></div>
<div align="left"><rule-attribute name="activation-group"
value="dekhajak" /></div>
<div align="left"> </div>
<div align="left"></lhs><rhs>System.out.println( message
); m.setMessage( message );</rhs></div>
<div align="left"></rule></div>
<div align="left"></package></div>
</font><font color="#ff0000" size="2">
<div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
<div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
<div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
<div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
</font></div>
<br>
<p> </p>
<hr size="1"> Check out what you're missing if you're not on <a
moz-do-not-send="true"
href="http://us.rd.yahoo.com/mail/in/ymessenger/*http://in.messenger.yahoo.com/">Yahoo!
Messenger</a>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>