[jboss-svn-commits] JBL Code SVN: r34189 - in labs/jbossrules/trunk/drools-docs: drools-docs-expert/src/main/docbook/en-US/Chapter-JSR94 and 12 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jul 26 09:53:07 EDT 2010
Author: ge0ffrey
Date: 2010-07-26 09:53:06 -0400 (Mon, 26 Jul 2010)
New Revision: 34189
Modified:
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Examples/Section-HonestPoliticianExample.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-JSR94/Section-How_To_Use.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-DSL.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-Rule.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-TypeDeclaration.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Performance_Tuning/Section-Performance.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-DSL.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-Rule.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-TypeDeclaration.xml
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-User_Guide/Section-Running.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-EventProcessingModes/Section-EventProcessingModes_StreamMode.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_Declaration.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_EventsMetadata.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_ExplicitExpirationPolicy.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_InferredExpirationPolicy.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-RulebasePartitioning/Section-RulebasePartitioning_MultithreadingManagement.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingLengthWindows.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingTimeWindows.xml
labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-StreamsSupport/Section-StreamsSupport_DeclaringAndUsingStreams.xml
labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Install/Section-Eclipse.xml
labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-Upgrade_tips.xml
labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-What_is_new_Drools_5.0.0.xml
Log:
don't use <programlisting> inside <para> (gives code coloring issues and is not really allowed)
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Examples/Section-HonestPoliticianExample.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Examples/Section-HonestPoliticianExample.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Examples/Section-HonestPoliticianExample.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -25,7 +25,7 @@
name and a boolean value for being honest. Four politicians with honest
state set to true are inserted.</para>
- <para><example>
+ <example>
<title>Class Politician</title>
<programlisting role="JAVA">public class Politician {
@@ -33,7 +33,8 @@
private boolean honest;
...
}</programlisting>
- </example><example>
+ </example>
+ <example>
<title>Honest Politician: Execution</title>
<programlisting role="JAVA">Politician blair = new Politician("blair", true);
@@ -47,10 +48,12 @@
ksession.insert( schroder );
ksession.fireAllRules();</programlisting>
- </example>The Console window output shows that, while there is at
+ </example>
+ <para>The Console window output shows that, while there is at
least one honest politician, democracy lives. However, as each
politician is in turn corrupted by an evil corporation, so that
- all politicians become dishonest, democracy is dead.<example>
+ all politicians become dishonest, democracy is dead.</para>
+ <example>
<title>Honest Politician: Console Output</title>
<programlisting>Hurrah!!! Democracy Lives
@@ -60,7 +63,8 @@
I'm an evil corporation and I have corrupted blair
We are all Doomed!!! Democracy is Dead
</programlisting>
- </example>As soon as there is at least one honest politician in the
+ </example>
+ <para>As soon as there is at least one honest politician in the
Working Memory a new <code>Hope</code> object is logically asserted.
This object will only exist while there is at least one honest
politician. As soon as all politicians are dishonest, the
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-JSR94/Section-How_To_Use.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-JSR94/Section-How_To_Use.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-JSR94/Section-How_To_Use.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -19,7 +19,7 @@
class is loaded using Class.forNamem, in much the same way as JDBC
drivers.</para>
- <para><example>
+ <example>
<title>Automatic RuleServiceProvider Registration</title>
<programlisting role="JAVA">// RuleServiceProviderImpl is registered to "http://drools.org/"
@@ -29,7 +29,8 @@
// Get the rule service provider from the provider manager.
RuleServiceProvider ruleServiceProvider =
RuleServiceProviderManager.getRuleServiceProvider("http://drools.org/");</programlisting>
- </example>The RuleServiceProvider provides access to the RuleRuntime and
+ </example>
+ <para>The RuleServiceProvider provides access to the RuleRuntime and
RuleAdministrator APIs. The RuleAdministrator provides an administration
API for the management of RuleExecutionSet objects, making it possible to
register a RuleExecutionSet that can then be retrieved via the
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-DSL.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-DSL.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-DSL.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -117,9 +117,10 @@
<para>The "{" and "}" characters should only be used on the left hand side
of the mapping (the expression) to mark tokens. On the right hand side you
- can use "{" and "}" on their own if needed - such as <programlisting>if (foo) \{
- doSomething();\ }</programlisting> as well as with the token names as
- shown above.</para>
+ can use "{" and "}" on their own if needed - such as</para>
+ <programlisting>if (foo) \{
+ doSomething();\ }</programlisting>
+ <para> as well as with the token names as shown above.</para>
<para>PLEASE NOTE that if you want curly braces to appear literally as
curly braces, then escape them with a backslack (\). Otherwise it may
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-Rule.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-Rule.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-Rule.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -490,12 +490,13 @@
<para>It is possible to change the evaluation priority by using
parentheses, as in any logic or mathematical expression. Example:</para>
- <para><example>
+ <example>
<title>Using parentheses to change evaluation priority</title>
<programlisting># Cheese type is stilton and ( price is less than 20 or age is mature ).
Cheese( type == "stilton" && ( price < 20 || age == "mature" ) ) </programlisting>
- </example>In the above example, the use of parentheses evaluates the
+ </example>
+ <para>In the above example, the use of parentheses evaluates the
connective '||' before the connective '&&'.</para>
<para>Also, it is important to note that besides having the same
@@ -1438,7 +1439,7 @@
match a set of constraints, <literal>forall</literal> can be written with a single pattern
for simplicity. Example:</para>
- <para><example>
+ <example>
<title>Single Pattern Forall</title>
<programlisting>rule "All Buses are Red"
@@ -1448,7 +1449,7 @@
# all asserted Bus facts are red
end
</programlisting>
- </example></para>
+ </example>
<para>Another example shows multiple patterns inside the <literal>forall</literal>:<example>
<title>Multi-Pattern Forall</title>
@@ -2236,7 +2237,7 @@
variable, <code>kcontext</code>, of type <code>KnowledgeContext</code>. Its
method <code>getKnowledgeRuntime()</code> delivers an object of type
<code>KnowledgeRuntime</code>, which, in turn, provides access to a wealth
- of methods, many of which are quite useful for coding RHS logic.
+ of methods, many of which are quite useful for coding RHS logic.</para>
<itemizedlist>
<listitem>
@@ -2249,12 +2250,11 @@
to this session's <code>Agenda</code>, which in turn provides access
to the various rule groups: activation groups, agenda groups, and
rule flow groups. A fairly common paradigm is the activation of some
- agenda group, which could be done with the lengthy call:
+ agenda group, which could be done with the lengthy call:</para>
<programlisting role="JAVA">
// give focus to the agenda group CleanUp
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup( "CleanUp" ).setFocus();</programlisting>
- (You can achieve the same using <code>drools.setFocus( "CleanUp" )</code>.)
- </para>
+ <para>(You can achieve the same using <code>drools.setFocus( "CleanUp" )</code>.)</para>
</listitem>
<listitem>
@@ -2288,7 +2288,6 @@
your operating system's environment.</para>
</listitem>
</itemizedlist>
- </para>
</section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-TypeDeclaration.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-TypeDeclaration.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Language_Reference/Section-TypeDeclaration.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -83,7 +83,7 @@
<para>For instance, we may want to declare another fact type
<code>Person</code>:</para>
- <para><example>
+ <example>
<title>declaring a new fact type: Person</title>
<programlisting><emphasis role="bold">declare</emphasis> Person
@@ -92,7 +92,8 @@
address : Address
<emphasis role="bold">end</emphasis>
</programlisting>
- </example>As we can see on the previous example,
+ </example>
+ <para>As we can see on the previous example,
<code>dateOfBirth</code> is of type <code>java.util.Date</code>,
from the Java API, while <code>address</code> is of the previously
defined fact type Address.</para>
@@ -101,7 +102,7 @@
every time you write it by using the <literal>import</literal> clause, as previously
discussed.</para>
- <para><example>
+ <example>
<title>Avoiding the need to use fully qualified class names by using
import</title>
@@ -112,7 +113,7 @@
dateOfBirth : Date
address : Address
<emphasis role="bold">end</emphasis></programlisting>
- </example></para>
+ </example>
<para>When you declare a new fact type, Drools will, at compile time,
generate bytecode that implements a Java class representing the fact
@@ -121,25 +122,25 @@
definition. So, for the previous example, the generated Java class would
be:</para>
- <para><example>
+ <example>
<title>generated Java class for the previous Person fact type
declaration</title>
- <programlisting><emphasis role="bold">public</emphasis> <emphasis
- role="bold">class</emphasis> Person implements Serializable {
- <emphasis role="bold">private</emphasis> String name;
- <emphasis role="bold">private</emphasis> java.util.Date dateOfBirth;
- <emphasis role="bold">private</emphasis> Address address;
+ <programlisting role="JAVA">public class Person implements Serializable {
+ private String name;
+ private java.util.Date dateOfBirth;
+ private Address address;
// getters and setters
// equals/hashCode
// toString
}
</programlisting>
- </example>Since the generated class is a simple Java class, it can
+ </example>
+ <para>Since the generated class is a simple Java class, it can
be used transparently in the rules, like any other fact.</para>
- <para><example>
+ <example>
<title>Using the declared types in rules</title>
<programlisting><emphasis role="bold">rule</emphasis> "Using a declared Type"
@@ -152,7 +153,7 @@
insert( mark );
<emphasis role="bold">end</emphasis>
</programlisting>
- </example></para>
+ </example>
</section>
<section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Performance_Tuning/Section-Performance.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Performance_Tuning/Section-Performance.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Performance_Tuning/Section-Performance.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -65,7 +65,7 @@
iterate over all elements of the opposite memory in order to find its
matches.</para>
- <para>So, for example, if we have a Rule like the following:
+ <para>So, for example, if we have a Rule like the following:</para>
<programlisting>rule "find brothers"
when
p1: Person( $mother : mother )
@@ -73,7 +73,8 @@
then
// do something
end
-</programlisting> If no indexing is used, each new Person object asserted into
+</programlisting>
+ <para>If no indexing is used, each new Person object asserted into
working memory will try to match each other previously asserted Person
object to find those that have the same mother. So, if we have 1000 Person
objects already asserted into working memory, and we assert a new one, the
@@ -135,13 +136,16 @@
<para>Although, every system has its own peculiarities and sometimes it is
possible to do some fine tuning on performance. For example, in our
Manners 64 example, if we disable the right memory indexing we would have
- the following result: <programlisting>Manners 64 with BetaNode indexing only for left memory: 142000 millisec to run on average
-</programlisting> The above is even worse than no using any indexing. This
+ the following result:</para>
+ <programlisting>Manners 64 with BetaNode indexing only for left memory: 142000 millisec to run on average
+</programlisting>
+ <para>The above is even worse than no using any indexing. This
happens clearly because for Manners 64, the left indexing overhead is
bigger than its benefit. So, if we do the contrary, leaving right indexing
- enabled and disabling the left indexing, we get the following result:
+ enabled and disabling the left indexing, we get the following result:</para>
<programlisting>Manners 64 with BetaNode indexing only for right memory: 8765 millisec to run on average
-</programlisting> So, we have the best scenario now. For Manners 64, the best
+</programlisting>
+ <para>So, we have the best scenario now. For Manners 64, the best
would be to disable left indexing, leaving only right indexing
enabled.</para>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-DSL.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-DSL.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-DSL.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -117,9 +117,12 @@
<para>The "{" and "}" characters should only be used on the left hand side
of the mapping (the expression) to mark tokens. On the right hand side you
- can use "{" and "}" on their own if needed - such as <programlisting>if (foo) \{
- doSomething();\ }</programlisting> as well as with the token names as shown
- above.</para><para>PLEASE NOTE that if you want curly braces to appear literally as curly braces, then escape them with a backslack (\). Otherwise it may think it is a token to be replaced.
+ can use "{" and "}" on their own if needed - such as</para>
+ <programlisting>if (foo) \{
+ doSomething();\ }</programlisting>
+ <para>as well as with the token names as shown
+ above.</para>
+ <para>PLEASE NOTE that if you want curly braces to appear literally as curly braces, then escape them with a backslack (\). Otherwise it may think it is a token to be replaced.
</para>
<para>Don't forget that if you are capturing strings from users, you will
also need the quotes on the right hand side of the mapping, just like a
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-Rule.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-Rule.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-Rule.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -444,12 +444,13 @@
<para>It is possible to change the evaluation priority by using
parenthesis, as in any logic or mathematical expression. Example:</para>
- <para><example>
+ <example>
<title>Using parenthesis to change evaluation priority</title>
<programlisting># Cheese type is stilton and ( price is less than 20 or age is mature ).
Cheese( type == "stilton" && ( price < 20 || age == "mature" ) ) </programlisting>
- </example>In the above example, the use of parenthesis makes the ||
+ </example>
+ <para>In the above example, the use of parenthesis makes the ||
connective be evaluated before the && connective.</para>
<para>Also, it is important to note that besides having the same
@@ -1373,7 +1374,7 @@
match a set of constraints, forall can be written with a single pattern
for simplicity. Example</para>
- <para><example>
+ <example>
<title>Single Pattern Forall</title>
<programlisting>rule "All Buses are Red"
@@ -1383,7 +1384,7 @@
# all asserted Bus facts are red
end
</programlisting>
- </example></para>
+ </example>
<para>Another example of multi-pattern forall:<example>
<title>Multi-Pattern Forall</title>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-TypeDeclaration.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-TypeDeclaration.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-TypeDeclaration.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -67,7 +67,7 @@
<para>For instance, we may want to declare another fact type
<emphasis>Person</emphasis>:</para>
- <para><example>
+ <example>
<title>declaring a new fact type: Person</title>
<programlisting><emphasis role="bold">declare</emphasis> Person
@@ -76,7 +76,8 @@
address : Address
<emphasis role="bold">end</emphasis>
</programlisting>
- </example>As we can see on the previous example,
+ </example>
+ <para>As we can see on the previous example,
<emphasis>dateOfBirth</emphasis> is of type <code>java.util.Date</code>,
from the Java API, while <emphasis>address</emphasis> is of the previously
defined fact type Address.</para>
@@ -85,7 +86,7 @@
every time you write it by using the <emphasis
role="bold">import</emphasis> clause, previously discussed.</para>
- <para><example>
+ <example>
<title>avoiding the need to use fully qualified class names by using
import</title>
@@ -96,32 +97,32 @@
dateOfBirth : Date
address : Address
<emphasis role="bold">end</emphasis></programlisting>
- </example></para>
+ </example>
<para>When you declare a new fact type, Drools will, at compile time,
generate bytecode implementing a POJO that represents the fact type. The generated Java
class will be a one-to-one Java Bean mapping of the type definition. So,
for the previous example, the generated Java class would be:</para>
- <para><example>
+ <example>
<title>generated Java class for the previous Person fact type
declaration</title>
- <programlisting><emphasis role="bold">public</emphasis> <emphasis
- role="bold">class</emphasis> Person implements Serializable {
- <emphasis role="bold">private</emphasis> String name;
- <emphasis role="bold">private</emphasis> java.util.Date dateOfBirth;
- <emphasis role="bold">private</emphasis> Address address;
+ <programlisting role="JAVA">public class Person implements Serializable {
+ private String name;
+ private java.util.Date dateOfBirth;
+ private Address address;
// getters and setters
// equals/hashCode
// toString
}
</programlisting>
- </example>Since it is a simple POJO, the generated class can be used
+ </example>
+ <para>Since it is a simple POJO, the generated class can be used
transparently in the rules, like any other fact.</para>
- <para><example>
+ <example>
<title>using the declared types in rules</title>
<programlisting><emphasis role="bold">rule</emphasis> "Using a declared Type"
@@ -135,7 +136,7 @@
insert( mark );
<emphasis role="bold">end</emphasis>
</programlisting>
- </example></para>
+ </example>
</section>
<section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-User_Guide/Section-Running.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-User_Guide/Section-Running.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-User_Guide/Section-Running.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -1109,7 +1109,7 @@
<section>
<title>Xstream Transformer</title>
- <para><example>
+ <example>
<title>XStream FromXML transformer stage</title>
<programlisting role="JAVA">XStream xstream = new XStream();
@@ -1121,7 +1121,7 @@
<programlisting role="JAVA">XStream xstream = new XStream();
Transformer transformer = PipelineFactory.newXStreamToXmlTransformer( xstream );
transformer.setReceiver( receiver );</programlisting>
- </example></para>
+ </example>
</section>
<section>
@@ -1146,7 +1146,7 @@
context of a pipeline by a custom Transformer that emits the nodes one
by one to its receiver.</para>
- <para><example>
+ <example>
<title>JAXB XSD Generation into the KnowlegeBuilder</title>
<programlisting role="JAVA">Options xjcOpts = new Options();
@@ -1159,7 +1159,8 @@
kbuilder,
xjcOpts,
"xsd" );</programlisting>
- </example> <example>
+ </example>
+ <example>
<title>JAXB From XML transformer stage</title>
<programlisting role="JAVA">JAXBContext jaxbCtx =
@@ -1168,32 +1169,34 @@
Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( unmarshaller );
transformer.setReceiver( receiver );
</programlisting>
- </example> <example>
+ </example>
+ <example>
<title>JAXB to XML transformer stage</title>
<programlisting role="JAVA">Marshaller marshaller = jaxbCtx.createMarshaller();
Transformer transformer = PipelineFactory.newJaxbToXmlTransformer( marshaller );
transformer.setReceiver( receiver );</programlisting>
- </example></para>
+ </example>
</section>
<section>
<title>Smooks Transformer</title>
- <para><example>
+ <example>
<title>Smooks FromSource transformer stage</title>
<programlisting role="JAVA">Smooks smooks = new Smooks( getClass().getResourceAsStream( "smooks-config.xml" ) );
Transformer transformer =
PipelineFactory.newSmooksFromSourceTransformer( smooks, "orderItem" );
transformer.setReceiver( receiver );</programlisting>
- </example> <example>
+ </example>
+ <example>
<title>Smooks ToSource transformer stage</title>
<programlisting role="JAVA">Smooks smooks = new Smooks( getClass().getResourceAsStream( "smooks-config.xml" ) );
Transformer transformer = PipelineFactory.newSmooksToSourceTransformer( smooks );
transformer.setReceiver( receiver );</programlisting>
- </example></para>
+ </example>
</section>
<section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-EventProcessingModes/Section-EventProcessingModes_StreamMode.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-EventProcessingModes/Section-EventProcessingModes_StreamMode.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-EventProcessingModes/Section-EventProcessingModes_StreamMode.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -93,7 +93,7 @@
<para>For instance:</para>
- <para><example>
+ <example>
<title>a rule that activates immediately upon matching</title>
<programlisting>rule "Sound the alarm"
@@ -104,12 +104,13 @@
// sound the alarm
end
</programlisting>
- </example>The above rule has no temporal constraints that would require
+ </example>
+ <para>The above rule has no temporal constraints that would require
delaying the rule, and so, the rule activates immediately. The following
rule on the other hand, must wait for 10 seconds before activating, since
it may take up to 10 seconds for the sprinklers to activate:</para>
- <para><example>
+ <example>
<title>a rule that automatically delays activation due to temporal
constraints</title>
@@ -120,11 +121,13 @@
then
// sound the alarm
end</programlisting>
- </example>This behaviour allows the engine to keep consistency when
+ </example>
+ <para>This behaviour allows the engine to keep consistency when
dealing with negative patterns and temporal constraints at the same time.
The above would be the same as writing the rule as bellow, but does not
burden the user to calculate and explicitly write the appropriate duration
- parameter:<example>
+ parameter:</para>
+ <example>
<title>same rule with explicit duration parameter</title>
<programlisting>rule "Sound the alarm"
@@ -135,6 +138,6 @@
then
// sound the alarm
end</programlisting>
- </example></para>
+ </example>
</section>
</section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_Declaration.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_Declaration.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_Declaration.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -25,7 +25,7 @@
<para>For instance, the example bellow is declaring that the fact type
StockTick in a stock broker application shall be handled as an event.</para>
- <para><example>
+ <example>
<title>declaring a fact type as an event</title>
<programlisting><emphasis role="bold">import</emphasis> some.package.StockTick
@@ -34,13 +34,13 @@
<emphasis>@role</emphasis>( event )
<emphasis role="bold">end</emphasis>
</programlisting>
- </example></para>
+ </example>
<para>The same applies to facts declared inline. So, if StockTick was a fact
type declared in the DRL itself, instead of a previously existing class, the
code would be:</para>
- <para><example>
+ <example>
<title>declaring a fact type and assiging it the event role</title>
<programlisting><emphasis role="bold">declare</emphasis> StockTick
@@ -51,7 +51,8 @@
price : double
<emphasis role="bold">end</emphasis>
</programlisting>
- </example>For more information on type declarations, please check the Rule
+ </example>
+ <para>For more information on type declarations, please check the Rule
Language section of the Drools Expert documentation.</para>
<para></para>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_EventsMetadata.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_EventsMetadata.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_EventsMetadata.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -140,7 +140,7 @@
hour and 35 minutes after they are inserted into the working memory, the
user would write:</para>
- <para><example>
+ <example>
<title>declaring the expiration offset for the VoiceCall
events</title>
@@ -150,7 +150,7 @@
<emphasis>@duration</emphasis>( callDuration )
<emphasis>@expires</emphasis>( 1h35m )
<emphasis role="bold">end</emphasis></programlisting>
- </example></para>
+ </example>
<para></para>
</section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_ExplicitExpirationPolicy.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_ExplicitExpirationPolicy.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_ExplicitExpirationPolicy.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -11,7 +11,7 @@
just use the declare statement and define an expiration for the fact
type:</para>
- <para><example>
+ <example>
<title>explicitly defining an expiration offset of 30 minutes for
StockTick events</title>
@@ -19,7 +19,8 @@
@expires( 30m )
end
</programlisting>
- </example>The above example declares an expiration offset of 30 minutes
+ </example>
+ <para>The above example declares an expiration offset of 30 minutes
for StockTick events. After that time, assuming no rule still needs the
event, the engine will expire and remove the event from the session
automatically.</para>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_InferredExpirationPolicy.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_InferredExpirationPolicy.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-MemoryManagement/Section-MemoryManagement_InferredExpirationPolicy.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -10,7 +10,7 @@
given event is implicitly, by analyzing the temporal constraints in the
rules. For instance, given the following rule:</para>
- <para><example>
+ <example>
<title>example rule with temporal constraints</title>
<programlisting>rule "correlate orders"
@@ -21,7 +21,8 @@
// do something
end
</programlisting>
- </example>Analyzing the above rule, the engine automatically calculates
+ </example>
+ <para>Analyzing the above rule, the engine automatically calculates
that whenever a BuyOrderEvent matches, it needs to store it for up to 10
seconds to wait for matching AckEvent's. So, the implicit expiration offset
for BuyOrderEvent will be 10 seconds. AckEvent, on the other hand, can only
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-RulebasePartitioning/Section-RulebasePartitioning_MultithreadingManagement.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-RulebasePartitioning/Section-RulebasePartitioning_MultithreadingManagement.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-RulebasePartitioning/Section-RulebasePartitioning_MultithreadingManagement.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -12,14 +12,14 @@
<para>To define the maximum size for the thread pool, the user may use the
following configuration option:</para>
- <para><example>
+ <example>
<title>setting the maximum number of threads for rule evaluation to
5</title>
<programlisting role="JAVA">KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
config.setOption( MaxThreadsOption.get(5) );
</programlisting>
- </example></para>
+ </example>
<para>The equivalent property is:</para>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingLengthWindows.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingLengthWindows.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingLengthWindows.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -24,7 +24,7 @@
100 readings from a sensor is above the threshold value, the rule would look
like:</para>
- <para><example>
+ <example>
<title>aggregating values over length windows</title>
<programlisting>rule "Sound the alarm in case temperature rises above threshold"
@@ -36,5 +36,6 @@
then
// sound the alarm
end</programlisting>
- </example>The engine will keep only the last 100 readings.</para>
+ </example>
+ <para>The engine will keep only the last 100 readings.</para>
</section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingTimeWindows.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingTimeWindows.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-SlidingWindows/Section-SlidingWindows_SlidingTimeWindows.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -21,7 +21,7 @@
case the average temperature over the last 10 minutes read from a sensor is
above the threshold value, the rule would look like:</para>
- <para><example>
+ <example>
<title>aggregating values over time windows</title>
<programlisting>rule "Sound the alarm in case temperature rises above threshold"
@@ -34,6 +34,7 @@
// sound the alarm
end
</programlisting>
- </example>The engine will automatically discard any SensorReading older
+ </example>
+ <para>The engine will automatically discard any SensorReading older
than 10 minutes and keep the calculated average consistent.</para>
</section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-StreamsSupport/Section-StreamsSupport_DeclaringAndUsingStreams.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-StreamsSupport/Section-StreamsSupport_DeclaringAndUsingStreams.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-fusion/src/main/docbook/en-US/Chapter-Features/Chapter-StreamsSupport/Section-StreamsSupport_DeclaringAndUsingStreams.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -17,7 +17,7 @@
rules says: a withdraw is authorized if and only if the account balance is
over the requested withdraw amount, the rule would look like:</para>
- <para><example>
+ <example>
<title>Example of Stream Usage</title>
<programlisting>rule "authorize withdraw"
@@ -28,7 +28,8 @@
// authorize withdraw
end
</programlisting>
- </example>In the previous example, the engine compiler will identify that
+ </example>
+ <para>In the previous example, the engine compiler will identify that
the pattern is tied to the entry point "ATM Stream" and will both create all
the necessary structures for the rulebase to support the "ATM Stream" and
will only match WithdrawRequests coming from the "ATM Stream". In the
@@ -39,7 +40,7 @@
applied to any account for which a withdraw request is placed at a bank
branch:</para>
- <para><example>
+ <example>
<title>Using a different Stream</title>
<programlisting>rule "apply fee on withdraws on branches"
@@ -50,7 +51,8 @@
// apply a $2 fee on the account
end
</programlisting>
- </example>The previous rule will match events of the exact same type as
+ </example>
+ <para>The previous rule will match events of the exact same type as
the first rule (WithdrawRequest), but from two different streams, so an
event inserted into "ATM Stream" will never be evaluated against the pattern
on the second rule, because the rule states that it is only interested in
@@ -65,7 +67,7 @@
inserting events directly into the working memory, insert them into the
entry point as shown in the example bellow:</para>
- <para><example>
+ <example>
<title>Inserting facts into an entry point</title>
<programlisting role="JAVA">// create your rulebase and your session as usual
@@ -77,7 +79,7 @@
// and start inserting your facts into the entry point
atmStream.insert( aWithdrawRequest );
</programlisting>
- </example></para>
+ </example>
<para>The previous example shows how to manually insert facts into a given
entry point. Although, usually, the application will use one of the many
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Install/Section-Eclipse.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Install/Section-Eclipse.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Install/Section-Eclipse.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -118,7 +118,7 @@
<para>Eclipse refreshing plug-ins in features and sites seems to not work,
so what is best is to manually edit the site.xml project and the
feature.xml. To do this, open the site.xml file in the drools-ide-update
- project, it should look something like this: <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ project, it should look something like this:</para> <programlisting><?xml version="1.0" encoding="UTF-8"?>
<site>
<!- change both the jar and the version number, make sure the new features jar is named
the same as what you put in ->
@@ -127,13 +127,15 @@
</feature>
<category-def name="JBossRules" label="JBoss Rules"/>
</site>
-</programlisting> Change the version attribute to be something new, and also
+</programlisting>
+ <para>Change the version attribute to be something new, and also
the name of the feature jar to have a new version number at the
end.</para>
<para>Go into the /feature directory, and unzip the feature jar to get to
the feature.xml. (the feature jar really just contains the feature.xml).
- Open the feature.xml, and it should look like: <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ Open the feature.xml, and it should look like:</para>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.drools.ide"
label="Drools Rule Workbench"
@@ -168,7 +170,8 @@
version="1.0.0"/> <!- THIS JUST HAS TO BE CONSISTENT WITH THE plug-in ->
</feature>
-</programlisting> Change the version number in the FEATURE tag to be the same
+</programlisting>
+ <para>Change the version number in the FEATURE tag to be the same
as what you referred to in the site.xml. If you changed the version number
of the main plug-in, you will need to put the version number in the plug
in tag (which refers to org.drools.ide plug-in). Then zip up the
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-Upgrade_tips.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-Upgrade_tips.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-Upgrade_tips.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -29,17 +29,19 @@
Sessions. In Drools 3.0.x, the code to create a working memory
was:</para>
- <para><example>
+ <example>
<title>Drools 3.0.x: Working Memory Creation</title>
<programlisting>WorkingMemory wm = rulebase.newWorkingMemory();</programlisting>
- </example>In Drools 4.0.x it must be changed to:</para>
+ </example>
+ <para>In Drools 4.0.x it must be changed to:</para>
- <para><example>
+ <example>
<title>Drools 4.0.x: Stateful Rule Session Creation</title>
<programlisting>StatefulSession wm = rulebase.newStatefulSession();</programlisting>
- </example>The StatefulSession object has the same behavior as the
+ </example>
+ <para>The StatefulSession object has the same behavior as the
Drools 3.0.x WorkingMemory (it even extends the WorkingMemory
interface), so there should be no other problems with this fix.</para>
</section>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-What_is_new_Drools_5.0.0.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-What_is_new_Drools_5.0.0.xml 2010-07-26 13:22:02 UTC (rev 34188)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-introduction/src/main/docbook/en-US/Chapter-Release_Notes/Section-What_is_new_Drools_5.0.0.xml 2010-07-26 13:53:06 UTC (rev 34189)
@@ -1173,14 +1173,14 @@
<para></para>
- <para><example>
+ <example>
<title>To insert facts into an entry point</title>
<programlisting>
WorkingMemoryEntryPoint entry = wm.getWorkingMemoryEntryPoint( "stock stream" );
entry.insert( ticker );
</programlisting>
- </example></para>
+ </example>
<para>StreamTest shows a unit for this.</para>
</section>
@@ -1325,7 +1325,7 @@
<section>
<title>Support to temporal operations over arbitrary dates.</title>
- <para><example>
+ <example>
<title>added the ability for point-in-time operators (before, after
and coincides) to be used with any arbitrary date field</title>
@@ -1337,7 +1337,7 @@
// allow access
end
</programlisting>
- </example></para>
+ </example>
</section>
</section>
More information about the jboss-svn-commits
mailing list