Uploaded image for project: 'Commons Digester'
  1. Commons Digester
  2. DIGESTER-9

Digester DTD does not provide a SetRootRule element

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Bugzilla Id:
      24613

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              george.gastaldi@neogrid.com.br George Gastaldi
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: