Commons Digester
  1. Commons Digester
  2. DIGESTER-131

[PATCH] commons-digester / Allow recursive match in ExtendedBaseRules.java (see patch)

    Details

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

      all

      Description

      Recursive tags in XML-rules-file only work on root node. Nested nodes like the one below to not work.
      With the attached patch, it is possible to specify rules like
      <...>
      <...>
      <pattern value="*/properties">
      <object-create-rule classname="de.wsy.f4ja.alertbatches.configuration.alerting.alertingconfig.Properties" />
      <set-properties-rule />
      <set-next-rule methodname="addProperties"/>
      </pattern>

      <pattern value="*/property">
      <object-create-rule classname="de.wsy.f4ja.alertbatches.configuration.alerting.alertingconfig.Property" />
      <set-properties-rule />
      <set-next-rule methodname="addProperty" />
      </pattern>
      </...>
      </..>

        Activity

        Hide
        Simone Tripodi added a comment -

        included in Apache Commons Digester 3.0 release

        Show
        Simone Tripodi added a comment - included in Apache Commons Digester 3.0 release
        Hide
        Simone Tripodi added a comment -

        Patch applied, see org.apache.commons.digester3.ExtendedBaseRules r1138914

        Show
        Simone Tripodi added a comment - Patch applied, see org.apache.commons.digester3.ExtendedBaseRules r1138914
        Hide
        Simone Tripodi added a comment -

        Hi Volker,
        apologizes but I wasn't able to manage that issue before
        Looking forward to publish 2.2 ASAP including the submitted patch, It would be nicer if you can provide in the patch also a TestCase that shows the benefit of the submitted code.
        Sorry but I'm not familiar with XML config, can you post here in the comments a sample that shows which is now allowed that was not admitted before?
        Many thanks in advance and apologizes once again,
        Simo

        Show
        Simone Tripodi added a comment - Hi Volker, apologizes but I wasn't able to manage that issue before Looking forward to publish 2.2 ASAP including the submitted patch, It would be nicer if you can provide in the patch also a TestCase that shows the benefit of the submitted code. Sorry but I'm not familiar with XML config, can you post here in the comments a sample that shows which is now allowed that was not admitted before? Many thanks in advance and apologizes once again, Simo
        Hide
        Volker Karlmeier added a comment -

        Hi Simone,

        why do you move this patch to the future ?
        Rahul told me to consider this patch in 2.1

        Regards

        Volker


        -------------------------------
        words a just some place to hide
        a wall that we can run behind..
        -------------------------------
        Volker Karlmeier
        Friedrich-Freye-Str. 61
        45481 Mlheim/Ruhr

        Tel. : (+49) 208-7785675
        Mobil: (+49) 176-21056587
        Mail : Volker@magiccode.eu

        Show
        Volker Karlmeier added a comment - Hi Simone, why do you move this patch to the future ? Rahul told me to consider this patch in 2.1 Regards Volker – ------------------------------- words a just some place to hide a wall that we can run behind.. ------------------------------- Volker Karlmeier Friedrich-Freye-Str. 61 45481 Mlheim/Ruhr Tel. : (+49) 208-7785675 Mobil: (+49) 176-21056587 Mail : Volker@magiccode.eu
        Hide
        Rahul Akolkar added a comment -

        Setting fix versions so this will be looked at before the next release.

        Show
        Rahul Akolkar added a comment - Setting fix versions so this will be looked at before the next release.
        Hide
        Volker Karlmeier added a comment -

        The above patch for ExtendedBaseRules provides the possibility of matching recursive patterns in subnodes.

        Show
        Volker Karlmeier added a comment - The above patch for ExtendedBaseRules provides the possibility of matching recursive patterns in subnodes.

          People

          • Assignee:
            Simone Tripodi
            Reporter:
            Volker Karlmeier
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 10m
              10m
              Remaining:
              Remaining Estimate - 10m
              10m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development