You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/10/07 09:53:02 UTC
DO NOT REPLY [Bug 23644] New: -
[PATCH] Support for ObjectParamRule in Digester XML rules
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23644>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23644
[PATCH] Support for ObjectParamRule in Digester XML rules
Summary: [PATCH] Support for ObjectParamRule in Digester XML
rules
Product: Commons
Version: 1.0 Alpha
Platform: All
OS/Version: Windows XP
Status: NEW
Severity: Enhancement
Priority: Other
Component: Digester
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: maslovsky@mail.ru
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. Attribute 'value' is optional,
in this case an object will be created using default ctor.
Tow files are patched:
DigesterRuleParser.java
digester-rules.dtd
Regards,
Anton
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org