Commons Digester
  1. Commons Digester
  2. DIGESTER-101

Pass namespace URI and name args to the Rule methods

    Details

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

      Operating System: All
      Platform: All

      Description

      As an enhancement to the current Digester API, I propose to add new variants to
      the Rule methods begin(), body() and end(). Those new variants would accept the
      namespace URI and local/qualified name of the current element.

      As Rule is not an interface, but an abstract class, this change can be done
      without hurting backwards compatibility. It will loosen the coupling between
      Rule implementations and Digester, as the rule would get sufficient information
      about the current element, without needing to call
      Digester.getCurrentElementName(). In addition, it provides access to the current
      namespace URI, which is not possible with the current version of Digester.

      I'll be attaching a patch that implements these changes. This involves changes
      to Rule.java, Digester.java and BeanPropertySetterRule.java. The latter change
      is not totally necessary, but rather demonstrates the benefits of the proposed
      API. All other Rule implementations could be changed later to remove the plenty
      deprecation warnings.

      [I've posted this patch to the commons-dev list before, I'm just adding it here
      so it doesn't get lost]

        Activity

        Christopher Lenz created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 13022 12340333
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Digester [ 12310471 ]
        Affects Version/s 1.3 Final [ 12311662 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Component/s Digester [ 12311111 ]
        Key COM-182 DIGESTER-101
        Henri Yandell made changes -
        Affects Version/s 1.3 Final [ 12311822 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Christopher Lenz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development