Re: [xml] xpath contains() function
- From: Daniel Veillard <veillard redhat com>
- To: "Vakoc, Mark" <Mark_Vakoc jdedwards com>
- Cc: "'xml gnome org'" <xml gnome org>
- Subject: Re: [xml] xpath contains() function
- Date: Mon, 5 Nov 2001 13:53:10 -0500
On Mon, Nov 05, 2001 at 11:38:06AM -0700, Vakoc, Mark wrote:
I seem to get differing results from various processers when using the xpath
contains() function with the second string as an empty string. I checked
the spec( http://www.w3.org/tr/xpath#function-contains and it makes no
mention of this case.
Other processors tested evaluate contains('test','') to false, while libxml
returns true which doesn't seem correct to me. Any idea on who is correct?
libxml is correct, they are wrong, please give them bug reports:
http://www.w3.org/1999/11/REC-xpath-19991116-errata/
Section 4.2
Add the following to the description of the contains function:
If the second argument string is the empty string, then true is returned.
which simply makes sense because any string contains an empty string.
Kind of a topological definition the empty set contains the empty set.
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]