This discussion is archived
0 Replies Latest reply: Oct 22, 2013 10:56 AM by 59b34730-962e-4a2e-a855-7b1f2d45af0c RSS

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

59b34730-962e-4a2e-a855-7b1f2d45af0c Newbie
Currently Being Moderated

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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points