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/11/11 18:26:33 UTC
DO NOT REPLY [Bug 24613] New: -
Digester DTD does not provide a SetRootRule element
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=24613>.
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=24613
Digester DTD does not provide a SetRootRule element
Summary: Digester DTD does not provide a SetRootRule element
Product: Commons
Version: 1.5 Final
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Digester
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: george.gastaldi@neogrid.com.br
In "public void addRuleInstances(Digester digester)" in
org.apache.commons.digester.xmlrules.DigesterRuleParser add:
digester.addFactoryCreate("*/set-root-rule", new SetRootRuleFactory());
digester.addRule("*/set-root-rule", new PatternRule("pattern"));
digester.addSetNext("*/set-root-rule", "add", ruleClassName);
and create the following inner class in
org.apache.commons.digester.xmlrules.DigesterRuleParser
protected class SetRootRuleFactory extends AbstractObjectCreationFactory {
public Object createObject(Attributes attributes) {
String methodName = attributes.getValue("methodname");
String paramType = attributes.getValue("paramtype");
return (paramType == null || paramType.length() == 0) ?
new SetRootRule( methodName)
:
new SetRootRule( methodName, paramType);
}
}
And this bug is over !
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org