Re: [xml] XPath substring fix
- From: Daniel Veillard <veillard redhat com>
- To: Richard Jinks <cyberthymia yahoo co uk>
- Cc: xml gnome org
- Subject: Re: [xml] XPath substring fix
- Date: Wed, 10 Apr 2002 12:14:57 -0400
On Wed, Apr 10, 2002 at 05:04:22PM +0100, Richard Jinks wrote:
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.
Excellent, applied and commited,
thanks !
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]