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

XmlObject node copy yields IllegalArgumentException: DocumentWrapper#wrap in Saxon on further XPath executions of copied node

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Version 2
    • Fix Version/s: Version 2
    • Component/s: XPath
    • Labels:
      None
    • Environment:
      Windows XP, Saxon 8.1, Java 1.4_05, XmlBeans 2.0

      Description

      A selectPath(Query) returns a child node of the wrapped document. The child node is then copied with the XmlObject.copy() method. My application requires a copy of the child node since it will be passed into a Threaded application which has no need to modify the resulting XML. The Child node has further children that I would like to use XPath queries to pull the desired node. However, when I issue a select path on the returned child node, I get the following error:

      java.lang.IllegalArgumentException: DocumentWrapper#wrap: supplied node does not belong to the wrapped DOM document

      I do not wish to construct a new XML document for the Child (and its children) to pass into my application. I just need the fragment to query, as the XML just represents "ini" type information.

        Attachments

        1. XPathCopy.zip
          104 kB
          Brian Rafalowski

          Activity

            People

            • Assignee:
              jacobd Jacob Danner
              Reporter:
              brianrafalowski Brian Rafalowski
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: