W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2004

[FO] error in fn:substring-before

From: Douglas Petkanics <petkanics@research.att.com>
Date: Thu, 10 Jun 2004 09:36:21 -0400
Message-ID: <40C863D5.4090707@research.att.com>
To: public-qt-comments@w3.org

In the functions and operators document, section 7.5.4.1, the function 
fn:substring-before has the following error:

Definition:
|fn:substring-before|(|$arg1|| as ||xs:string?|, 
|$arg2|| as ||xs:string?|)| as ||xs:string|
|Behavior description: |
||If the value of |$arg2| is the zero-length string, then the function 
returns the zero-length string.
Example given:
|fn:substring-before("Baloney!","")| returns "|Baloney!|".

In the example, $arg2 is given as the 0 length string, however this 
returns the word Baloney. The behavioral description states that it 
should return the 0 length string. Am I misunderstanding?

Thanks,
Doug
Received on Thursday, 10 June 2004 09:40:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:20 UTC