Hi Jonna,

This should work:

let $next := codepoints-to-string(string-to-codepoints($alphabet)[1] + 1)

Kind regards,
Geert

Van: [email protected] 
[mailto:[email protected]] Namens Jonna Marry
Verzonden: donderdag 17 februari 2011 10:32
Aan: General Mark Logic Developer Discussion
Onderwerp: [MarkLogic Dev General] How to pass next alphabet in range query

Hi,

I am using element range index query.I have to pass the Alphabet dynamically 
from A- Z. Is there any funtion available to get the next alphabet to give in 
boundary condition. If the user selected value is "E" then how to predict the 
next alphabet is "F" and give in range query

let $alphabet:= "E"
cts:search( fn:collection("Book"),
  cts:and-query((
    cts:element-range-query(xs:QName("Title"),">=", $alphabet),
    cts:element-range-query(xs:QName("Title"),"<", "F")
  ))
)
Thanks in advance

Regards,
Jonna


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to