i had problems with the patch format. please use (cvs) diff -u in future. also please consider contributing (as simon requested) a unit test for the submitted code.
- robert
On Tuesday, October 7, 2003, at 08:47 AM, Anton Maslovsky wrote:
Hi,
I've added support for the ObjectParamRule in XML rules file for the Digester. The syntax is as follows:
<!--
ObjectParamRule
attrname - an arbitrary Object defined programatically, assigned if the element pattern AND specified attribute name are matched
param - an arbitrary Object defined programatically, assigned when the element pattern associated with the Rule is matched
type - class name for object
value - initial value for the object
-->
<!ELEMENT object-param-rule EMPTY>
<!ATTLIST object-param-rule
pattern CDATA #IMPLIED
paramnumber CDATA #REQUIRED
param CDATA #REQUIRED
attrname CDATA #IMPLIED
type CDATA #REQUIRED
value CDATA #IMPLIED>
XML example:
<object-param-rule paramnumber="0" type="java.lang.String" value="meter.serial"/>
Generaly, type attribute can be any Java type. The value can be a string representation of any type that stnaddard ConvertUtils classes are capable to convert into the corresponding object instance.
Tow files are patched:
DigesterRuleParser.java digester-rules.dtd
Regards, Anton
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
