Dear Grégoire,
collection("cities")//city[starts-with(alt_names/name,$search)] [...]
[XPTY0004] No sequence (element name { ... }, element name { ... }) allowed.
- Is this a bug?
The first argument of starts-with() accepts only single items. The following version will work as expected:
collection("cities")//city[altnames/name[starts-with(., $search)]]
- What is the equivalent in BaseX to request:get-parameter, which works in
"eXist db" and affects the GET parameter (here "search") to the $search variable?
BaseX doesn't support HTTP requests on it. We're currently working on an extension of our integrated libraries, so we plan, e.g., to include the EXPath proposal for HTTP requests in near future.
Hope this helps, Christian