Commons Digester
  1. Commons Digester
  2. DIGESTER-9

Digester DTD does not provide a SetRootRule element

    Details

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

      Operating System: All
      Platform: All

      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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            George Gastaldi
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development