xsl-list
[Top] [All Lists]

Re: [xsl] index-of and empty stuff

2013-12-21 15:04:54
Ihe,

Let $s := '' (the empty string)

index-of(('a','b','c'),$s) -> 0
index-of(('a','b','c',''),$s) -> 4

Personally I am happy not to get 0, in either case, when $s is (). :-)

Cheers, Wendell

Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^


On Fri, Dec 20, 2013 at 12:50 PM, Ihe Onwuka 
<ihe(_dot_)onwuka(_at_)gmail(_dot_)com> wrote:
if I am searching a sequence of strings with index-of having the empty
string as the second argument will give me 0.

Why throw  an error if the 2nd argument is empty sequence,
irrespective of the type of the first argument.

Isn't 0 the obvious answer here.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>