RE: [xml] XPath question w/ libxml2



So I agree it sounds like this should select no node.
The difference though is that at least on my platform this works as
expected:
  
Yep, not on my platform (win32):
C:\gsstools\bin>xmllint --shell c:\t.xml
/ > ls
---        9 root
/ > xpath root[1]
Object is a Node Set :
Set contains 1 nodes:
1  ELEMENT root
/ > xpath root[number('NaN')]
Object is a Node Set :
Set contains 1 nodes:
1  ELEMENT root
/ >

I'm afraid you might be seeing some weird floating point troubles.
Can you try to see if the basic tests from test/XPath/expr/floats
work correctly first ? Then it might be number('NaN') failing or
the index tests.

Ok, will look into those tests and try and patch it up now that I know
what the correct behavior should be.

Mark

R




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]