commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16785] New: - Missing DTD definition for BeanPropertySetterRule
Date Tue, 04 Feb 2003 22:13:18 GMT
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=16785>.
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=16785

Missing DTD definition for BeanPropertySetterRule

           Summary: Missing DTD definition for BeanPropertySetterRule
           Product: Commons
           Version: 1.4 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Digester
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: bhandy@users.sf.net
                CC: bhandy@users.sf.net


In the class "DigesterRuleParser" and the corresponding "digester-rules.dtd", 
there is no support for defining a BeanPropertySetterRule in a digester-
rules.xml file.

I have added the appropriate support and I am including the diffs here:

Index: DigesterRuleParser.java
===================================================================
RCS file: /home/cvspublic/jakarta-
commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterRulePars
er.java,v
retrieving revision 1.10
diff -r1.10 DigesterRuleParser.java
225a226,229
>         digester.addFactoryCreate("*/bean-property-setter-rule", new 
BeanPropertySetterRuleFactory());
>         digester.addRule("*/bean-property-setter-rule", new PatternRule
("pattern"));
>         digester.addSetNext("*/bean-property-setter-rule", "add", 
ruleClassName);
>         
490a495,514
>     /**
>      * Factory for creating a BeanPropertySetterRule.
>      */
>     private class BeanPropertySetterRuleFactory extends 
AbstractObjectCreationFactory {
>         public Object createObject(Attributes attributes) throws Exception {
>             Rule beanPropertySetterRule = null;
>             String propertyname = attributes.getValue("propertyname");
>                 
>             if (propertyname == null) {
>                 // call the setter method corresponding to the element name.
>                 beanPropertySetterRule = new BeanPropertySetterRule();
>             } else {
>                 beanPropertySetterRule = new BeanPropertySetterRule
(propertyname);
>             }
>             
>             return beanPropertySetterRule;
>         }
>         
>     }
> 


Index: digester-rules.dtd
===================================================================
RCS file: /home/cvspublic/jakarta-
commons/digester/src/java/org/apache/commons/digester/xmlrules/digester-
rules.dtd,v
retrieving revision 1.5
diff -r1.5 digester-rules.dtd
13c13
< <!ENTITY % rule-elements "call-method-rule | call-param-rule |
---
> <!ENTITY % rule-elements "bean-property-setter-rule | call-method-rule | 
call-param-rule |
19c19
< <!ELEMENT digester-rules (pattern | include | call-method-rule | call-param-
rule | factory-create-rule | object-create-rule | set-properties-rule | set-
property-rule | set-top-rule | set-next-rule )*>
---
> <!ELEMENT digester-rules (pattern | include | bean-property-setter-rule | 
call-method-rule | call-param-rule | factory-create-rule | object-create-rule 
| set-properties-rule | set-property-rule | set-top-rule | set-next-rule )*>
37,38c37,38
< <!ELEMENT pattern (pattern | include | call-method-rule | call-param-rule |
<                    factory-create-rule | object-create-rule |
---
> <!ELEMENT pattern (pattern | include | bean-property-setter-rule | call-
method-rule |
>                    call-param-rule | factory-create-rule | object-create-
rule |
69a70,74
> <!ELEMENT bean-property-setter-rule EMPTY>
> <!ATTLIST bean-property-setter-rule
>     pattern      CDATA #IMPLIED
>     propertyname CDATA #IMPLIED>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message