Hi Ankit,
I am trying to compare to compare two nodes containing same double values with different scientific notation, matching the two nodes return false. But it should return true. Please help me out.
The reason is that the values are compared as nodes, not as doubles. You'll have to convert your input to numeric values. Here are two solutions that work:
let $a := number(<a>123.4</a>) let $b := number(<a>12.34E1</a>) return deep-equal($a,$b)
let $a := <a>123.4</a> let $b := <a>12.34E1</a> return xs:double($a) eq xs:double($b)
Best, Christian
============================================== let $a := <a>123.4</a> let $b := <a>12.34E1</a> return deep-equal($a,$b)
Expected : true Output : false
Thanks Ankit