[basex-talk] xquery:eval bug?
Hi, I'm trying to return a map or an array from xquery:eval. Seems this is not possible, yet the signature says it returns item()* xquery:eval('1 + 1') => 2 xquery:eval('[1,2]') => ERROR: [FOTY0014] Items of type array(*) have no string representation. xquery:eval('map { "x": 10 }') => ERROR: [FOTY0014] Items of type map(*) have no string representation. BTW: I saw that xquery:eval#3 is documented as returning item() while the other arities return item()* Tested on 8.3, haven't tested yet on 8.4beta but it's trivial to repro I figure. -- --Marc
[basex-talk] Security
Hi Everyone, Sorry if this is a dumb question. What is a good way to do security in BaseX? I found a stub here: http://docs.basex.org/wiki/Security:_Use_Cases What I would like is to be able to restrict who can do what with a database. Here are a few things I'd like to be able to do: 1. Grant create, read, update, and delete permissions on each document in a database, and have a default mask for a database document. 2. Say whether a user can or cannot execute a function or visit a URL (and get something besides a 404). 3. Allow the creation of roles which can be assigned to users. (Having a particular role allows all users with that role to do particular things, like update docs, or visit particular URLs.) 4. No doubt there are more desiderata. E.g. one might conceivably want to be able to grant permissions at the node level within a document. Any pointers? Best, Tim Finney
[basex-talk] ft:search and using thesaurus
Hi all, hi Christian, for a flexible search I want to use this programatic approach: let $ft := map { 'wildcards': true() } let $terms := 'Pa.*' for $city in ft:search('factbook', $terms, $ft)/parent::name[ancestor::city] let $hits := ft:mark($city[ft:contains(text(), $terms, $ft)]) return let $name := $city/ancestor::country/name return ($hits, $name) How could I integrate 'using thesaurus at "thesaurus.xml"', unfortunately thesaurus is not part of the $options argument of ft:search. Cheers, Günter