You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/03/09 21:45:09 UTC

[jira] Reopened: (DIGESTER-9) Digester DTD does not provide a SetRootRule element

     [ https://issues.apache.org/jira/browse/DIGESTER-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell reopened DIGESTER-9:
----------------------------------


> Digester DTD does not provide a SetRootRule element
> ---------------------------------------------------
>
>                 Key: DIGESTER-9
>                 URL: https://issues.apache.org/jira/browse/DIGESTER-9
>             Project: Commons Digester
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Operating System: All
> Platform: All
>            Reporter: George Gastaldi
>             Fix For: 1.6
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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