<!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">
Once your XML has stabalised and you are happy with it, I can evetually
help you make an exercise parse if needed - doesn't take long, based on
our existing pluggeable framework.<br>
<br>
mark<br>
Michael Neale wrote:
<blockquote
cite="mid:96ab3ced0701281520g644d1889kaccd2b773dcd8858@mail.gmail.com"
type="cite">Yeah the control in XStream is limited of course, but that
XML looks nice enough. You can also easily generate a schema for
reference purposes as needed.<br>
<br>
Of course, as mark said, we can bake this into a non XML grammar
eventually, but for now, I think that looks fine ! (as long as its
documented with lots of examples !).
<br>
<br>
Michael.<br>
<br>
<div><span class="gmail_quote">On 1/29/07, <b
class="gmail_sendername">Mark Proctor</b> <<a moz-do-not-send="true"
href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>>
wrote:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">As
long as you don't care about controlling the output too much, XStream<br>
is simple and nice.<br>
<br>
XML is good and quick way to prototype what you are doing, hopefully we<br>
can eventually also build this into the antlr grammar.
<br>
<br>
Mark<br>
Geoffrey De Smet wrote:<br>
> Michael told me on irc that XStream might also be a good idea.<br>
><br>
> Since I 'd like the configuration as a separate domain object
model,<br>
> I tryed it that way and it looks ok:
<br>
><br>
><br>
> <LocalSearchSolver><br>
> <randomSeed>5</randomSeed><br>
> <finish class="StepCountFinish"><br>
> <maximumStepCount>50</maximumStepCount>
<br>
> </finish><br>
> </LocalSearchSolver><br>
><br>
> What do you think of such kind of local search solver
configuration?<br>
><br>
><br>
><br>
> Here are the classes that do it, they follow the builder pattern:
<br>
><br>
> @XStreamAlias("LocalSearchSolver")<br>
> public class LocalSearchSolverConfig {<br>
><br>
> private long randomSeed = 0;<br>
><br>
> @XStreamAlias("finish")<br>
> private FinishConfig finishConfig;
<br>
><br>
> public LocalSearchSolver build() ...<br>
><br>
> }<br>
><br>
> @XStreamAlias("StepCountFinish")<br>
> public class StepCountFinishConfig implements FinishConfig {<br>
><br>
> private int maximumStepCount = 100;
<br>
><br>
> public Finish build() ...<br>
><br>
> }<br>
><br>
><br>
> which looks a lot easier than fiddling around with sax or DOM?<br>
> Xsd might be a problem - but maybe some day XStream can use the
<br>
> javadocs to generate an xsd? If not, it shouldn't be to hard to<br>
> replace the config package with a sax or dom based configuration -
or<br>
> just manually write an xsd.<br>
><br>
> With kind regards,
<br>
> Geoffrey De Smet<br>
><br>
><br>
> Mark Proctor wrote:<br>
>> Look at our xml reader.Its xerces based and pluggeable and
should<br>
>> easily be able to adapt to anything.<br>
>><br>
>> Mark
<br>
>> Geoffrey De Smet wrote:<br>
>>> For the solver I 'd like to externalize the configuration
into an<br>
>>> xml(?) file.<br>
>>> something like<br>
>>><br>
>>> <localsearch decisionMode="OPTIMAL">
<br>
>>> <finish steps="500"/><br>
>>> <ruleBase location="/org/foo/bar/drools.drl"/><br>
>>> </localsearch><br>
>>><br>
>>> This is a bit inspired by how ehcache is configured, clean
and easy,
<br>
>>> without any class implementation details: the way users
like it.<br>
>>><br>
>>><br>
>>> I 've been thinking on doing this with XStream, but that's
not<br>
>>> versatile enough to make user friendly configuration
files. Although
<br>
>>> Xstream works out great to serialize solutions to and from
xml files.<br>
>>><br>
>>> Next I was thinking about is JDom or Xom, but that's yet
another<br>
>>> dependency. What would you guys recommend?
<br>
>>><br>
>>><br>
>><br>
>> _______________________________________________<br>
>> rules-dev mailing list<br>
>> <a moz-do-not-send="true"
href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<br>
>> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
>><br>
><br>
> _______________________________________________<br>
> rules-dev mailing list
<br>
> <a moz-do-not-send="true" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
><br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a moz-do-not-send="true" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev
</a><br>
</blockquote>
</div>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>