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

RE: [FO] error in fn:substring-before

From: Michael Kay <mhk@mhk.me.uk>
Date: Thu, 10 Jun 2004 15:32:29 +0100
To: "'Douglas Petkanics'" <petkanics@research.att.com>, <public-qt-comments@w3.org>
Message-Id: <20040610143322.E83F2A1469@frink.w3.org>

Thanks, this is a known error. The result for this example should be "".

Michael Kay 

> -----Original Message-----
> From: public-qt-comments-request@w3.org 
> [mailto:public-qt-comments-request@w3.org] On Behalf Of 
> Douglas Petkanics
> Sent: 10 June 2004 13:36
> To: public-qt-comments@w3.org
> Subject: [FO] error in fn:substring-before
> 
> 
> 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 10:33:23 UTC

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