HI
I want to perform combination (AND OR) search on the basis of the provided parameter by the user, where user will select the field name e.g.(title, isbn, author) and their value from front-end so here field name will be the parameter for the BaseX.

Currently i am asking front-end person the generate below combination query
( (title = "United States" or isbn = "2345371242192") and author ="Jhon" )

Now the all parameter value will be compared to  specific XPATH , like below.

let $Author := 'David Hare'
let $title := "United States "
let $isbn:= '2345371242192 '

return
db:open('test')/*[(( normalize-space(string-join((*:info/*:author)[1]/*:personname//text()) ) = $Author or $title = *:info/*:title ) and  $isbn="*:info/isban")]/base-uri()

In the above code XPATH is hardcoded, but I want it to concatenate  on the fly once string query comes front-end then it will be passed to Basex .

Is there any other way to achieve this? or how should i ask combinations query from front-end so that  i could achieve this.

Thanks
Dharmendra Kumar Singh