type bug with []

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

type bug with []

Adam Retter-7
If you look at the following query it all executes as expected -

declare variable $strings { "string1","string2","string3"};

for $str at $i in $strings return
        if(exists($strings[$i + 1 cast as xs:integer]))then
                concat($str, ",")

However if I remove the "cast as xs:integer" from withing the [] then $i
+ 1 does not evaluate correctly inside [].

I am wandering if this is by design or if it is a bug (I suspect so)
that is to say that in the above case using either -

1) [$i + 1]
2) [$i + 1 cast as xs:integer]

should give the same results???

Presumably in the for loop $i would be of type xs:integer and 1 is an
integer so im not sure where the bug lies?!?


Adam Retter

Devon Portal Developer

Devon Portal Project
County Hall
EX11 1PU

t: 01392 38 3683
f: 01392 38 2966
e: [hidden email]
w: http://www.devonline.gov.uk

This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
Exist-open mailing list
[hidden email]