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

Digester DTD does not provide a SetRootRule element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.6
    • None
    • Operating System: All
      Platform: All

    • 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

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

            Dates

              Created:
              Updated:
              Resolved: