Hy (and sorry for my "frenchy" english),

I've found an error this afternoon in the package description for the
org.apache.commons.digester package :

in the "Processing Rules" part of the doc, there is this definition for the
SetNextRule rule :
<When the begin() method is called, the digester analyzes the next-to-top
element on the stack, looking for a property setter method for a specified
property. It then calls this method, passing the object at the top of the
stack as an argument. This rule is commonly used to establish one-to-many
relationships between the two objects, with the method name commonly being
something like "addChild". >
After looking at the source code, it appears that the right definition is :
<When the end() method is called, the digester analyzes the next-to-top
element on the stack, looking for a property setter method for a specified
property. It then calls this method, passing the object at the top of the
stack as an argument. This rule is commonly used to establish one-to-many
relationships between the two objects, with the method name commonly being
something like "addChild".>

In the "Element Matching Patterns" part of the doc, the last paragraph is :
<It is quite possible that, when a particular XML element is being parsed,
the pattern for more than one registered processing rule will be matched
(either because you registered more than one processing rule with the same
matching pattern, or because one more more exact pattern matches and
wildcard pattern matches are satisfied by the same element. When this
occurs, the corresponding processing rules will all be fired, in the order
that they were initially registered with the Digester.>
It will be fine to add that begin() methods are processed in the order the
Rules where initially registered with the Digester, while end() methods are
processed in reverse order.

Sebastien BRUNOT
[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to