Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xpath expression not working with xmlparserv2 10.x jar in websphere application server 8

1049591Oct 22 2013

Hi,

I am using xmlparserv2 10.x  jar in websphere application server to transform xml. Due to some unknown reason we are seeing inconsistent result for the xpath expression we used inside the xslt.

.|following-sibling::* This is the xpath expression we use.

the meaning of the expression is to union the current node and the following siblings of the current node. But while rendering the page( a servlet) for first two times it gives the expected result. From the third time, it is giving unexpected results. It is missing the first node in the following-sibling::* So it just results in current node and misses the next node and then combine the nodes following the next node.

For example when executing the above expression on the node A , it should result A B C D. It is returing correctly for first 3 times. From the 4th time it just results  A C D and misses B.

<root>

     <A />

     <B />

     <C />

     <D />

</root>

But it giving results consistently when using xmlparserv2 9.x jar. But it is not 1.5 compliant.

Pleas help!..

Thanks,

SP.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2013
Added on Oct 22 2013
0 comments
1,090 views