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

        George Gastaldi created issue -
        Hide
        George Gastaldi added a comment -

        Forgot to mention: The DTD must be updated also !

        Show
        George Gastaldi added a comment - Forgot to mention: The DTD must be updated also !
        Hide
        George Gastaldi added a comment -

        Update DTD with this:

        <!-- SetRootRule -->
        <!ELEMENT set-root-rule EMPTY>
        <!ATTLIST set-root-rule
        pattern CDATA #IMPLIED
        methodname CDATA #REQUIRED
        paramtype CDATA #IMPLIED>

        Show
        George Gastaldi added a comment - Update DTD with this: <!-- SetRootRule --> <!ELEMENT set-root-rule EMPTY> <!ATTLIST set-root-rule pattern CDATA #IMPLIED methodname CDATA #REQUIRED paramtype CDATA #IMPLIED>
        Hide
        Craig McClanahan added a comment -

        Fixed in nightly build 20040215. Thanks for the patches!

        Show
        Craig McClanahan added a comment - Fixed in nightly build 20040215. Thanks for the patches!
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 24613 12341090
        Henri Yandell made changes -
        Affects Version/s 1.5 Final [ 12311664 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Component/s Digester [ 12311111 ]
        Project Commons [ 12310458 ] Commons Digester [ 12310471 ]
        Key COM-939 DIGESTER-9
        Henri Yandell made changes -
        Affects Version/s 1.5 Final [ 12311691 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Henri Yandell made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.6 [ 12311712 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development