Hi A fix for a bug in the XPath Substring function (xmlXPathSubstringFucntion()). As noted by the special cases in the XPath spec, substring() should always return the empty string ("") if either of the two arguments are NaN, or if the index argument is -Infinity and the length is Infinity. Before, the substring() function didn't handle these cases and just returned the whole input string. The fix attached adds specific checks for these cases to handle them correctly. I've also included new tests / results to include these cases, and have also added a new test case to cover the ".4" fix sent this morning. Thanks, Richard
Attachment:
xpath_substring.diff
Description: Binary data