Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-432

Add the value that will be set to the PrePostSetFeature interface

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      All platforms

      Description

      The PrePostSetFeature is very useful but the current handler interface lacks the value that will be set (especially in the preSet method):

      public static boolean preSet(int opType, XmlObject xo, QName prop, boolean isAttr, int index)

      { ... return true; }

      If the value that will be set was passed to the handler it would be possible to write handlers that can filter or manipulate the data before it is set. This would also allow writing a simple handler that does not set null values, what many people would appreciate (according to postings in the forum).

      Therefore I suggest to enhance the interface as follows:

      public static boolean preSet(int opType, XmlObject xo, QName prop, boolean isAttr, int index, Object value)
      { ... return true; }

        Attachments

        1. xmlbeans.patch
          13 kB
          Raino Kolk

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bugdigger Tom
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: