[basex-talk] Adding basex-talk to markmail
Hi all, I wasn't able to find basex-talk in markmail.org - a fantastic site for searching mailing list archives. Would the list owners/administrators consider submitting this list to markmail? Information about this can be found at http://markmail.org/docs/feedback.xqy. Best, Joe
Re: [basex-talk] Strange behaviour on db:add inside restxq
Hi Christian, thanks a lot for this! We'll give it a try soon. BR, M. On 05/01/2016 13:44, Christian Grün wrote: Hi Marco, With the latest snapshot [1], XML bodies of http:send-request() arguments won’t be indented anymore. You can enforce this behaviour in all BaseX versions by adding the http:indent='no' option in the body element: http:send-request( http://localhost:8984/test/savemsg;> ) Hope this helps, Christian [1] http://files.basex.org/releases/latest/ On Tue, Dec 22, 2015 at 4:58 PM, Marco Letterewrote: Hi Christian, the same. Even if putting the xml body on one single line with no spaces at all, exactly the three codepoints 10, 32, 32 are somehow added in the stored version of the document. :-( M. From: Christian Grün Sent: Tuesday, December 22, 2015 4:35 PM To: Marco Lettere Cc: BaseX Subject: Re: [basex-talk] Strange behaviour on db:add inside restxq Hi Marco, I agree that this behavior is contra-intuitive. It may have been triggered by our gradual attempts to push back the default chopping of whitespaces [1]. What happens if you remove the whitespaces in your requests? http:send-request( http://localhost:8984/test/savemsg;> ) Christian [1] https://github.com/BaseXdb/basex/issues/913 On Mon, Dec 21, 2015 at 4:32 PM, Marco Lettere wrote: Hi all, We've run into a strange issue that we never experienced beforehand even if it's something we should have done thousands of time. Consider storing a resource sent through a RestXQ POST directly to a database. The restxq module module namespace o = "test"; (:sendMessage: Send a new message:) declare %rest:path('test/savemsg') %rest:POST('{$body}') %rest:consumes("application/xml") function o:save-message($body as document-node()) { db:add('hereiam', $body, 'saved.xml') }; The client request: http:send-request( http://localhost:8984/test/savemsg;> ) The resource gets stored into the DB with all the extra text nodes containing white spaces (codepoints 10 and 32) something like: That's pretty strange because if I PUT the resource through Basex REST interface it doesn't create the spaces and the same if I directly db:add the resource. We noticed this oddity on BaseX 8.3.1 and could verify it on a Basex 8.2 and 8.1.1 as well. It works neatly on an older 7.9 version we still have around The applies same if the resource is sent through curl or Chrome Postman. What are we doing wrong? Thanks. Marco.
Re: [basex-talk] group-by behaviour for clustering XML fragments
Hi Christian, I should have read the spec more fully. So clearly I will need to create a custom grouping key as the atomization process (fn:data) basically passes over attribute values: let $val := Institut für Organische Chemie der Universität Heidelberg return data($val) => results in "Institut für Organische Chemie der Universität Heidelberg" as a grouping key. Thanks for pointing me in the right direction. C. -Original Message- From: Christian Grün [mailto:christian.gr...@gmail.com] Sent: 09 January 2016 18:49 To: Hondros, Constantine (ELS-AMS) Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] group-by behaviour for clustering XML fragments Hi Constantine, > Incidentally, BaseX is simply unbelievably fast at executing this – a > million fragments clustered and written out to another DB in 16 > seconds on a laptop. My congratulations on an amazing product. Thanks! > If I use the entire XML fragment as a grouping key, something like this: > [...] > … then will the grouping be equivalent to the functionality of the > deep-equal function? A grouping keys is the atomized value of a grouping variable [1,2]. If this value is prone to be ambiguous, you can create an arbitrary other value, e.g. as follows: group by $val := string-join($a/*, '; ') Cheers, Christian [1] http://docs.basex.org/wiki/XQuery_3.0#group_by [2] http://www.w3.org/TR/xquery-30/#id-group-by Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.
Re: [basex-talk] group-by behaviour for clustering XML fragments
Please remove me from this list please be done the unsubscribe 3times now thank you Sent from Yahoo Mail on Android On Mon, Jan 11, 2016 at 4:25 AM, Hondros, Constantine (ELS-AMS)wrote: Hi Christian, I should have read the spec more fully. So clearly I will need to create a custom grouping key as the atomization process (fn:data) basically passes over attribute values: let $val := Institut für Organische Chemie der Universität Heidelberg return data($val) => results in "Institut für Organische Chemie der Universität Heidelberg" as a grouping key. Thanks for pointing me in the right direction. C. -Original Message- From: Christian Grün [mailto:christian.gr...@gmail.com] Sent: 09 January 2016 18:49 To: Hondros, Constantine (ELS-AMS) Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] group-by behaviour for clustering XML fragments Hi Constantine, > Incidentally, BaseX is simply unbelievably fast at executing this – a > million fragments clustered and written out to another DB in 16 > seconds on a laptop. My congratulations on an amazing product. Thanks! > If I use the entire XML fragment as a grouping key, something like this: > [...] > … then will the grouping be equivalent to the functionality of the > deep-equal function? A grouping keys is the atomized value of a grouping variable [1,2]. If this value is prone to be ambiguous, you can create an arbitrary other value, e.g. as follows: group by $val := string-join($a/*, '; ') Cheers, Christian [1] http://docs.basex.org/wiki/XQuery_3.0#group_by [2] http://www.w3.org/TR/xquery-30/#id-group-by Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.