Commons Digester
  1. Commons Digester
  2. DIGESTER-80

[PATCH] Support for ObjectParamRule in Digester XML rules

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: All

      Description

      I've added support for the ObjectParamRule in XML rules file for the Digester.
      The syntax is as follows:

      <!--
      ObjectParamRule
      attrname - an arbitrary Object defined programatically, assigned if the
      element pattern AND specified attribute name are matched
      param - an arbitrary Object defined programatically, assigned when the
      element pattern associated with the Rule is matched
      type - class name for object
      value - initial value for the object
      -->
      <!ELEMENT object-param-rule EMPTY>
      <!ATTLIST object-param-rule
      pattern CDATA #IMPLIED
      paramnumber CDATA #REQUIRED
      param CDATA #REQUIRED
      attrname CDATA #IMPLIED
      type CDATA #REQUIRED
      value CDATA #IMPLIED>

      XML example:

      <object-param-rule paramnumber="0" type="java.lang.String"
      value="meter.serial"/>

      Generaly, type attribute can be any Java type. The value can be a string
      representation of any type that stnaddard ConvertUtils classes are capable to
      convert into the corresponding object instance. Attribute 'value' is optional,
      in this case an object will be created using default ctor.

      Tow files are patched:

      DigesterRuleParser.java
      digester-rules.dtd

      Regards,
      Anton

        Activity

        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Affects Version/s 1.5 Final [ 12311691 ]
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Digester [ 12310471 ]
        Key COM-867 DIGESTER-80
        Affects Version/s 1.5 Final [ 12311664 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Component/s Digester [ 12311111 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 23644 12341018
        Hide
        Simon Kitching added a comment -

        These patches were committed by rdonkin at 2003-10-23.

        Show
        Simon Kitching added a comment - These patches were committed by rdonkin at 2003-10-23.
        Hide
        Anton Maslovsky added a comment -

        Created an attachment (id=8478)
        Patch for digester-rules.dtd file to support ObjectParamRule in XML rules

        Show
        Anton Maslovsky added a comment - Created an attachment (id=8478) Patch for digester-rules.dtd file to support ObjectParamRule in XML rules
        Hide
        Anton Maslovsky added a comment -

        Created an attachment (id=8477)
        Patch for DigesterRuleParser.java class to support ObjectParamRule in XML rules

        Show
        Anton Maslovsky added a comment - Created an attachment (id=8477) Patch for DigesterRuleParser.java class to support ObjectParamRule in XML rules
        Anton Maslovsky created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Anton Maslovsky
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development