You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "Shinith PP (Jira)" <ji...@apache.org> on 2022/10/11 15:07:00 UTC

[jira] [Created] (XMLBEANS-629) org.apache.xmlbeans.XmlObject.selectPath(String arg0) API returns wrong values after org.apache.xmlbeans.XmlCursor.moveXml(XmlCursor arg0) API call

Shinith PP created XMLBEANS-629:
-----------------------------------

             Summary: org.apache.xmlbeans.XmlObject.selectPath(String arg0) API returns wrong values after org.apache.xmlbeans.XmlCursor.moveXml(XmlCursor arg0) API call
                 Key: XMLBEANS-629
                 URL: https://issues.apache.org/jira/browse/XMLBEANS-629
             Project: XMLBeans
          Issue Type: Bug
          Components: XPath
    Affects Versions: Version 3.1.0,  Version 2.3, Version 5.1.1
         Environment: Windows/Linux
            Reporter: Shinith PP
         Attachments: XMLBeanBugTest.zip

When I search for an XmlObject within the root xml document using org.apache.xmlbeans.XmlObject.selectPath(String arg0) API with following query expression selectPath() is returning the matching XmlObject.

selectPath("declare namespace wf='http://www.example.org/SimplifiedSchema' //wf:data[@id='data.85']")

*{color:#de350b}but calling the same method with same query expression returns no matching XmlObjects after moving one child xml object from one location to another location within using org.apache.xmlbeans.XmlCursor.moveXml(XmlCursor arg0) API{color}.*

As per my xml schema my xml have the following structure.

<session>
    <task>
        <task>
            <data><data/>
        </task>
    </task>
</session>

root document is session. Inside session we can have task. Inside task we can have task and data.

*{color:#de350b}The issue arises when I search for a data using it's id after moving one child task to new location within a parent task.{color}*

I have attached the schema file and sample code to reproduce the issue for reference.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org