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

Pass namespace URI and name args to the Rule methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3
    • None
    • None
    • Operating System: All
      Platform: All

    • 13022

    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]

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--Rule.diff
          11 kB
          Christopher Lenz

        Activity

          People

            Unassigned Unassigned
            cmlenz Christopher Lenz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: