Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-240

XOP:Include information is not retained by OMElement clone()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      Problem Summary:
      The OMElement.clone() method makes a clone of the current element. However, if the OMElement contains nested XOP:Include nodes, the information (datahandlers, content-ids) are not preserved. In fact, the attachments are lost completely.

      Solution:
      Currently, the clone() implementation does two things:
      (A) Gets a XMLStreamReader to read the events from the source element.
      (B) Constructs a StAXOMBuilder to create the new cloned tree.

      (A) will be changed to changed to query the source builder. If it is XOPAware, then the XMLStreamReader will be toggled to deliver XOP optimized events.

      (B) If the source builder is XOPAware, then an XOPAwareOMBuilder will be created to build the target tree.
      This will guarantee that the XOP include information (datahandlers, content-ids) are retained.

      I am also including a validation test to verify the new changes.

      I will commit the change after some additional testing

      Attachments

        Activity

          People

            scheu@us.ibm.com Rich Scheuerle
            scheu@us.ibm.com Rich Scheuerle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified