Re: [basex-talk] Serialization issue with HTTP response

2019-01-16 Thread Marco Lettere
at 11:35 AM Marco Lettere wrote: Hi all, we have to deal with a third-party REST service which in case of error conditions returns this mime type: application/problem+json; charset=utf-8. I wrote this RestXQ [1] to mock it. Just copy it into restxq.xqm... When I call it like [2] I get [XPTY0004

[basex-talk] Documentation suggestion

2019-01-15 Thread Marco Lettere
Hi Christian, I suggest to add an explicit statement of which is the default value of the combine option of map:merge. Currently the only reference is in the Change notes at the bottom of the page. Thanks! Marco.

[basex-talk] Serialization issue with HTTP response

2019-01-15 Thread Marco Lettere
Hi all, we have to deal with a third-party REST service which in case of error conditions returns this mime type: /*application/problem+json; charset=utf-8*/. I wrote this RestXQ [1] to mock it. Just copy it into restxq.xqm... When I call it like [2] I get /*[XPTY0004] Cannot convert

Re: [basex-talk] BaseX 9.1.1

2018-12-14 Thread Marco Lettere
Yeah! A Christmas edition! Thank you all for this! M. On 14/12/18 11:31, Christian Grün wrote: Hi all, we are glad to provide you with version 9.1.1 of BaseX! It’s actually more than just a maintenance release: XQuery: - Comprehensive rewritings of positional predicates and functions -

Re: [basex-talk] restxq

2018-11-09 Thread Marco Lettere
It looks like your basexhttp server is pointing to a different directory than the one you expect. This might happen from time to time depending on type of installation env variables and things like that. M. On 09/11/18 13:30, Christian Grün wrote: …difficult to tell. Could you please provide

Re: [basex-talk] BaseX 9.1: The Autumn Edition

2018-10-31 Thread Marco Lettere
CHEERS! M. On 31/10/18 17:34, Christian Grün wrote: Dear XML and XQuery aficionados, It’s been exactly 5 months ago when BaseX 9 was released, and we are happy to announce version 9.1 of our XML framework, database system and XQuery 3.1 processor! The latest release is online:

Re: [basex-talk] Sir, when basex 9.1, please ;-)

2018-10-23 Thread Marco Lettere
Yes Christian, it works with ws:emit() and I also understand the point now. This embedded support for websockets allows us to reduce our code base in some use cases by several hundreds lines of code. Not speaking about dependency management and configuration tricks to be documented. Great job!

Re: [basex-talk] Sir, when basex 9.1, please ;-)

2018-10-22 Thread Marco Lettere
Hi, I'm just hijacking Maximilian's email here to post the following test I wanted to do for experimenting with BaseX and Websockets. I wrote the code at [1] with the intent to open a RESTXQ entrypoint that receives a JSON via POST and the broadcastst it to all connecte WS clients. I might be

Re: [basex-talk] Tomcat & services

2018-10-15 Thread Marco Lettere
able to define an external database directory for Tomcat? Or would you indeed like to have servlet-specific databases removod if On Mon, Oct 15, 2018 at 5:47 PM Marco Lettere <mailto:m.lett...@gmail.com>> wrote: Ok, actually on my personal PC jobs are correctly listed also

Re: [basex-talk] Tomcat & services

2018-10-15 Thread Marco Lettere
Ok, actually on my personal PC jobs are correctly listed also with basexhttp (need to investigate why on my colleagues PC this doesn't work). Back to the more important issue... I put the following jobs.xml[1] file in the data folder and get [2] as first lines of log in dba after reboot. I put

Re: [basex-talk] Tomcat & services

2018-10-15 Thread Marco Lettere
Hi Christian, thank you as usual for your attention. With standalone I mean basexhttp which is what we usually do. This time we have requirement for running inside tomcat... The jobs.xml file looks like: if (db:exists('onedb')) then () else db:create('ondedb') but we have also tried with:

[basex-talk] Tomcat & services

2018-10-10 Thread Marco Lettere
Dear all, has anyone experience with exploiting the persistent jobs (services) feature under Tomcat? We have installed services with the proper jobs.xml file. When running jobs:services() in the DBA after startup, we get the services listed. Nevertheless none of the XQuery scripts inside

Re: [basex-talk] Output `out:format` function question

2018-10-08 Thread Marco Lettere
On 08/10/2018 02:39, Bridger Dyson-Smith wrote: out:format("%06d", 256, 367) -> 000256 (: the second item() is ignored :) Hi Dyson, as far as I understand regarding this example the number of handled items depends on the format string. out:format("%06d %06d", 256, 367) would probably

Re: [basex-talk] BaseX GUI repo install shortcut

2018-09-25 Thread Marco Lettere
O commands. If you prefer to edit the files outside the repository, you could type the REPO INSTALL command into the input bar on top of the GUI and execute it every time after you’ve updated your files. Hope this helps, Christian On Tue, Sep 4, 2018 at 12:47 PM Marco Lettere wrote: Hi Chris

Re: [basex-talk] BaseX GUI repo install shortcut

2018-09-25 Thread Marco Lettere
, you could type the REPO INSTALL command into the input bar on top of the GUI and execute it every time after you’ve updated your files. Hope this helps, Christian On Tue, Sep 4, 2018 at 12:47 PM Marco Lettere wrote: Hi Christian et al, I'm not aware of any shortcut (keyboard, flag or any

[basex-talk] Tomcat and UserPrincipal

2018-09-20 Thread Marco Lettere
Hi all, when deploying a BaseX RestXQ module as a Tomcat webapp in a container that uses embedded realm based authentication is there any way to retrieve the login name after being redirected to the protected page? I remember back in J2EE times there was a dedicated method getUserPrincipal.

Re: [basex-talk] web:response-header & Set-Cookie

2018-09-18 Thread Marco Lettere
Hi Bogdan, I assume the last map is for options only. All headers should go into the second map. Try with: return (     web:response-header(   map { 'media-type': web:content-type($path) },   map { 'Cache-Control': 'max-age=3600,public', 'Set-Cookie': 'JSESSIONID=' || session:id()

[basex-talk] BaseX GUI repo install shortcut

2018-09-04 Thread Marco Lettere
Hi Christian et al, I'm not aware of any shortcut (keyboard, flag or any) for speeding up the reinstallation of a REPO module once the XQ file is being updated when working in the GUI. At the moment I always reinstall from the preference menu but when developing in continuous it's a bit

Re: [basex-talk] [XQUERY] Filter and paging with window clause

2018-08-28 Thread Marco Lettere
:path($doc) } ) ... Sorting is a blocking operator, though: All documents will need to be checked first in order to tell which one will be the smallest or largest hit. Best, Christian On Tue, Aug 28, 2018 at 4:01 PM Marco Lettere wrote: and what if, a pervert I know, would like to have the

Re: [basex-talk] [XQUERY] Filter and paging with window clause

2018-08-28 Thread Marco Lettere
: for tumbling window $w in db:open("adatabase")[every $f in $filters satisfies $f(.)] start $first at $s when ($s = 1 + ($page - 1) * $count) end $last at $e when $e - $s = $count - 1 return $w Cheers, Christian On Tue, Aug 28, 2018 at 3:27 PM Marco Lettere wrote

Re: [basex-talk] [XQUERY] Filter and paging with window clause

2018-08-28 Thread Marco Lettere
satisfies $f(.)] start $first at $s when ($s = 1 + ($page - 1) * $count) end $last at $e when $e - $s = $count - 1 return $w Cheers, Christian On Tue, Aug 28, 2018 at 3:27 PM Marco Lettere wrote: Oh, yes. Thank you Martin. That is obviously a good point. The input is a database wi

Re: [basex-talk] [XQUERY] Filter and paging with window clause

2018-08-28 Thread Marco Lettere
art $first at $s when ($s = 1 + ($page - 1) * $count)     end $last at $e when $e - $s = $count - 1     return $w Regards, Marco. On 28/08/2018 14:19, Martin Honnen wrote: On 28.08.2018 11:04, Marco Lettere wrote: here's a question related to XQuery, sorry for being slightly off-topic. I'm

[basex-talk] [XQUERY] Filter and paging with window clause

2018-08-28 Thread Marco Lettere
Hi all, here's a question related to XQuery, sorry for being slightly off-topic. I'm struggling to find a way to combine the windowing clause and FLOWR in order to get a paged result of a subset of items which respect a given filter. Of course I'm able to get this by first applying the

Re: [basex-talk] IETF Date in If-Modified-Since header

2018-05-29 Thread Marco Lettere
-header-annotation [2] https://github.com/exquery/exquery/issues [3] http://docs.basex.org/wiki/Request_Module#request:header On Tue, May 29, 2018 at 1:49 PM, Marco Lettere <mailto:m.lett...@gmail.com>> wrote: Hello all, need to use the If-Modified-Since header in one o

[basex-talk] IETF Date in If-Modified-Since header

2018-05-29 Thread Marco Lettere
Hello all, need to use the If-Modified-Since header in one of my APIs. The format requested is the IETF date format: If-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMT as explained in [1]. If I pass the header as prescribed to a restxq made like: declare   %rest:path("config")  

[basex-talk] Documentation inquiries

2018-05-16 Thread Marco Lettere
Hi all, investigating the new features tagged 9.x, I discovered a lot of great stuff. I have teo smaller questions ... I'd like to know whether the new "-c flag" for the Basex Http Server in [1] means that one can request a script of commands to be executed once at startup of the server. Is

Re: [basex-talk] baseX vs ExistDB

2018-04-20 Thread Marco Lettere
On 20/04/2018 15:49, Christian Grün wrote: Hi Omar, Thank you (and everyone else) for sharing your experiences. * BaseX in comparison to exist-db turned out to be particularly bad at hosting multiple XQuery based applications like RestXQ endpoint in one instance. Definitely true; BaseX was

Re: [basex-talk] Validation Module: validate:xsd-report( ) improvement

2018-04-19 Thread Marco Lettere
Hi Yitzhak, maybe, by slightly rewriting your code,  you could remove the unwnated attribute and serialize your output to a file and view it from a text editor? let $xml := 'd:\Temp\CDW\HOME\id4879_BO201801_HomeSubscriberMovementFact.xml' let $xsd :=

Re: [basex-talk] Multipart and charset

2018-04-16 Thread Marco Lettere
, Marco Lettere <m.lett...@gmail.com> wrote: Hi everyone, when parsing a multipart response we are getting from a server we need to integrate with basex raises the exception [1]. By forcing the mediatype (with override-media-type attribute) to text/plain we've been able to see that part

[basex-talk] Multipart and charset

2018-04-05 Thread Marco Lettere
Hi everyone, when parsing a multipart response we are getting from a server we need to integrate with basex raises the exception [1]. By forcing the mediatype (with override-media-type attribute) to text/plain we've been able to see that parts look something like [2]. Our suspect was that

Re: [basex-talk] BaseX 9.0: The Spring Edition!

2018-03-26 Thread Marco Lettere
Thank you all very much for this great tool! I'm eagerly looking forward to use the new version and the new site layout looks amazing. Well done! M. On 23/03/2018 21:32, Christian Grün wrote: Dear BaseX aficionados, We are very happy to announce the release of BaseX 9.0! The new version of

[basex-talk] Uncomprehensible (at least to me) behaviour with external bindings

2018-03-21 Thread Marco Lettere
Hi all, trying to understand why we get the exception [2] running the code [1] in a Java app, I stumbled upon a strange behaviour of the GUI. I rewrote the query to: xquery:eval(" declare variable $_dep as xs:long* external; $_dep[2] * $_dep[2]", map{ "_dep" : (1,2,3)}) obtaining the

[basex-talk] 9.0?

2018-01-29 Thread Marco Lettere
Hi Christian & team, since XML Prague 18 is approaching I remembered that there used to be this wonderful habit of releasing a new BaseX version for the event :-). I am wondering whether there are any timing plans for the 9.0 release. In particular we are eager to test the new features [1]

Re: [basex-talk] BaseX Sharding with ActiveMQ & Docker

2018-01-05 Thread Marco Lettere
Hi James, as to my experience the approach works. I've tried to use N Slaves BaseX (DB only) instances coordinated by one Master BaseX including HTTP server. On the latter I implemented a RestXQ [1] receiving a HTTP request which was then turned into a XQuery and executed on the different

Re: [basex-talk] TLS 1.2

2017-12-18 Thread Marco Lettere
Great! Thanks to you! M. On 18/12/2017 20:18, Christian Grün wrote: Thanks, Marco. Your pull request has been merged, and the documentation has been updated [1]. Cheers, Christian [1] http://docs.basex.org/wiki/Options#IGNOREHOSTNAME On Mon, Dec 18, 2017 at 10:44 AM, Marco Lettere <m.l

Re: [basex-talk] TLS 1.2

2017-12-18 Thread Marco Lettere
Hi Christian, I've filed a pull request [1] to the github repo. I've tested it with our use case and it works fine. Check it out and let me know. Regards, Marco. [1] https://github.com/BaseXdb/basex/pull/1533 On 17/12/2017 22:58, Christian Grün wrote: Hi Marco, Thanks for reporting all the

Re: [basex-talk] TLS 1.2

2017-12-13 Thread Marco Lettere
our »success story«, Christian On Mon, Dec 11, 2017 at 9:37 PM, Marco Lettere <m.lett...@gmail.com> wrote: Hi again, your words put me on the right way. My doubt was how to pass the information to the http module send-request functon. After some investigation I've found out that it may be done by s

Re: [basex-talk] TLS 1.2

2017-12-11 Thread Marco Lettere
Hi again, your words put me on the right way. My doubt was how to pass the information to the http module send-request functon. After some investigation I've found out that it may be done by setting some env variables through -D in the startup scripts pointing to server and client certificates

Re: [basex-talk] TLS 1.2

2017-12-11 Thread Marco Lettere
Hi Christian, currently not too much since I first have to get used to the protocol details of Mutual TLS1.2 authentication [1]. I have a PKCS12 file containing both server and client certificates/keys (which are required for mutual auth) and I'm really not sure how all this info relataed to

[basex-talk] TLS 1.2

2017-12-07 Thread Marco Lettere
Hi list, I need to perform an integration with a service that talks HTTP over TLS 1.2. I have the mutual certificates and all the rest. My idea was to do as less as possible (mostly handshaking) in Java and then use the Java call the code from inside XQuery where all the rest happens.

[basex-talk] Documentation typo

2017-11-20 Thread Marco Lettere
Hi all, I think there is a typo in the documentation on the map:merge function [1]. The Summary states the possibility to use "use-combine" as a value for duplicates option but it should be 'combine' only. Regards, M. [1] http://docs.basex.org/wiki/Map_Module#map:merge

Re: [basex-talk] Rounding/parsing decimal vs float

2017-11-01 Thread Marco Lettere
L'), 'Wrong format: ' > || $str) > }; > > local:parse-decimal('123.45e-300') > > [1] https://en.wikipedia.org/wiki/Exponentiation_by_squaring > > Am Mittwoch, 01. November 2017 13:21 CET, Marco Lettere < > m.lett...@gmail.com> schrieb: > > Thanks Kristian, > > un

[basex-talk] Rounding/parsing decimal vs float

2017-11-01 Thread Marco Lettere
Hi all, I thought of asking this in parallel of hacking my own parsing procedure ... Is there a native way to parse scientific notation string into xs:decimal since a direct casting (xs:decimal("1e1")) is not allowed? Thanks, Marco.

Re: [basex-talk] Performance issues and query optimizer

2017-10-20 Thread Marco Lettere
ere no indexing is exploited and return time is 76msec. Anyway how hard I try (with basex 8.6.6) I'm not able to fool the optimizer and even these attempts ar eable to perfectly exploit the index. declare function local:q($db) {   db:open($db)//entry[@zip = "53040" and @city ="BE

Re: [basex-talk] Performance issues and query optimizer

2017-10-20 Thread Marco Lettere
Hi France, check out the info window of the GUI in a test-run it will tell. Anyway I think that if the database name is in a declared variable it should defintely be able to grasp the index. If $dbname is passed into another function as a function parameter then it could be that the info for

Re: [basex-talk] Architecture question

2017-10-19 Thread Marco Lettere
Hi, not only browser clients but all other application (written in Java, nodeJS, Python ...) supporting websocket client libraries I suppose! ;-) Waiting eagerly for it ... M. On 19/10/2017 19:08, Christian Grün wrote: Hi Dave, Kendall has already given you all relevant information

Re: [basex-talk] AUTHMETHOD = Custom

2017-10-18 Thread Marco Lettere
Hi, I think that you should be able to bypass authehtication at all by setting a default user (org.basex.user) for the HTTP access to Basex at startup. This can be done either as explained in [1] by declaring the option in the web.xml inserting it like follows in the context of RESTXQ/REST

Re: [basex-talk] BaseX-Visualisierungen (GUIs) für factbook.xml

2017-10-12 Thread Marco Lettere
Hi Ralph-Robert, I think you should import factbook as database in order to benefit from the different visualizations of the GUI. The red * icon or "New ..." menu or ctrl+N should start the Wizard you have to follow for creating a new database and then point to factbook.xml for the initial

Re: [basex-talk] [basex-announce] Moving on to Java 8?

2017-09-27 Thread Marco Lettere
Hi Christian, most important thing for us is moving to Jetty 9 thus cutting down the dependency to Java 7 feels like a completely favorable deal! Anyway thanks for asking! Regards, Marco. On 27/09/2017 15:19, George Sofianos wrote: I think it's great that BaseX is moving to Java 8. However I

Re: [basex-talk] OutOfMemoryError at Query#more()

2017-09-22 Thread Marco Lettere
*(ROFL)* On 22/09/2017 17:10, Fabrice ETANCHAUD wrote: Be warned : by using XQuery and BaseX, you are going to feel your coworkers’ fear for your new gain of productivity ! Like your management’s fear for a such powerful and underrated technology ! ;-) Best regards, Fabrice

Re: [basex-talk] Server Variables, cached vars, etc

2017-09-21 Thread Marco Lettere
Great! M. On 21/09/2017 12:52, Christian Grün wrote: …done [1]. A new 8.7 snapshot is available [1]. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://files.basex.org/releases/latest/ On Wed, Sep 20, 2017 at 7:37 PM, Christian Grün wrote:

[basex-talk] DBA deployed on JBoss (Wildfly)

2017-09-20 Thread Marco Lettere
Hi all, We created an application web app based on the BaseX .WAR distribution. If we deploy it under tomcat we can access all DBA related functionalities after the login prompt. If we try to do the same under WildFly 10, the application starts without errors but trying to access the DBA pages

Re: [basex-talk] Server Variables, cached vars, etc

2017-09-18 Thread Marco Lettere
terface. Best regards, Fabrice -Message d'origine- De : Fabrice ETANCHAUD Envoyé : mardi 5 septembre 2017 09:29 À : 'Marco Lettere'; basex-talk@mailman.uni-konstanz.de Objet : RE: [basex-talk] Server Variables, cached vars, etc Hi all, Another solution is to share a main memory data

Re: [basex-talk] Server Variables, cached vars, etc

2017-09-05 Thread Marco Lettere
On 05/09/2017 01:37, Erik Peterson wrote: How can I create a variable that is evaluated only once but accessed across many RestXQ requests and sessions. I'm trying to cache data that comes from an integration with an expensive operation. Does BaseX support something similar to server variables

Re: [basex-talk] Best practice for storing timestamp information in XML

2017-08-30 Thread Marco Lettere
Hi Kendall, just pay attention to the fact that one micro is 10^-6 of a unit. Thus 0.01 of a second is one microsecond. Regards, Marco. On 30/08/2017 03:52, Kendall Shaw wrote: I assume these are durations, but I’m not sure if the clock start date is relevant. If you can assume it’s not

Re: [basex-talk] CG 40

2017-07-08 Thread Marco Lettere
Auguri di buon compleanno! Only 40? a youngster I'd say! :-D M. On 08/07/2017 08:28, Imsieke, Gerrit, le-tex wrote: “You’ll become smart at the age of forty,” a Swabian saying goes („Mit 40 wird man g’scheid.“, see also [1]). If this is true, and if the (excellent) current system is

[basex-talk] Clarification on hof:until

2017-06-16 Thread Marco Lettere
Dear Basex team, today I was trying out hof:until with the code [1]. According to the documentation [2] it should behave like a sort of "do code until condition" and I'd expect it to return 1 but I get 0 instead thus it rather seems like a "until condition do code". Are my expectations

Re: [basex-talk] starting and closing HTTP server giving errors

2017-03-08 Thread Marco Lettere
-- An HTML attachment was scrubbed... URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/ attachments/20170307/16ecc05b/attachment-0001.html> ---------- Message: 2 Date: Tue, 7 Mar 2017 18:09:36 +0100 From: Marco Lettere <m.lett...@gmail.com> To: bas

Re: [basex-talk] HTTP status codes

2017-03-06 Thread Marco Lettere
space page = 'rev'; import module namespace err="error" at "../repo/rest_errors.xqm"; declare %rest:path("softwareberatung/rev/{$year}/{$id}") %rest:GET %output:method("json") function page:get-revenue( $year, $id ) { error(xs:QName('err:notf

Re: [basex-talk] basexhttpstop hangs in 8.6.1

2017-03-02 Thread Marco Lettere
window, the server does stop, but the basexhttpstop script keeps hanging. -- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library www.linkedin.com/in/timathompson t...@princeton.edu On Tue, Feb 28, 2017 at 6:22 AM, Marco Lettere <m.lett...@gmail.c

Re: [basex-talk] basexhttpstop hangs in 8.6.1

2017-02-28 Thread Marco Lettere
the shutdown process. > I cannot reproduce this with the zip distribution on both Window 10 > and Ubuntu; have you changed anything in the configuration files? > > Christian > > > > On Tue, Feb 28, 2017 at 9:38 AM, Marco Lettere <m.lett...@gmail.com> > wrote: > > Hi

Re: [basex-talk] basexhttpstop hangs in 8.6.1

2017-02-28 Thread Marco Lettere
Hi Christian, -d doesn't add much info. But we've found out that the shutdown script hangs on a file BasexHTTP8985 in the tmp directory. This happens btw on Windows 7 too. If we delete the file, while basexhttpstop is blocked, then basexhttpstop ends immediately and correctly. If we ctrl-c

[basex-talk] basexhttpstop hangs in 8.6.1

2017-02-26 Thread Marco Lettere
Hello all, I just downloaded Basex861.zip for Linux (Ubuntu 16.04 the host). Unizipped and started basexhttp. Everything ok. In another shell I launch basexhttpstop which correctly shuts down the server started before. But basexhttpstop itself does not terminate. This is causing some

[basex-talk] Somewhat unusual question

2017-02-22 Thread Marco Lettere
Hi to everyone, probably this is not the right place for such a discussion but the BaseX communitiy is the one I'm better introduced to and the one I trust the most. So I hope that this somewhat unusual excursus will anyway be of interest to some of you. As for myself I fell in love with

[basex-talk] Static context

2017-02-04 Thread Marco Lettere
Hi BaseX community, I'm wondering whether there is the possibility to keep some kind of in-memory state among successive RestXQ invocations. I know I could use the session object but this comes at the risk of loosing the state at session expiration. I could of course use a DB but with this

Re: [basex-talk] What's wrong here?

2017-02-01 Thread Marco Lettere
/Profiling_Module#prof:current-ms On Wed, Feb 1, 2017 at 7:50 PM, Marco Lettere <m.lett...@gmail.com> wrote: Hello all, when running the following query: hof:until( function($i){ $i = 10}, function($i){ (admin:write-log(xs:string(current-dateTime()) || " -- " || $i), prof:sle

[basex-talk] What's wrong here?

2017-02-01 Thread Marco Lettere
Hello all, when running the following query: hof:until( function($i){ $i = 10}, function($i){ (admin:write-log(xs:string(current-dateTime()) || " -- " || $i), prof:sleep(1000), $i + 1)}, 0 ) I get the following output: 19:49:07.400SERVERadminINFO

Re: [basex-talk] Counting

2017-01-27 Thread Marco Lettere
Hi Joseph, what about this? let $input := red red blue green green return { for $a in $input/* let $t := $a/text() group by $t return for $a2 at $pos in $a return {$a2/text()} } Ciao, M. On 27/01/2017 09:08, meumapple wrote: Hi, I have a structure like

Re: [basex-talk] RestXQ returning JSON

2017-01-24 Thread Marco Lettere
with should do the trick. Anyway, thanks for the hint to the NullPointerException, this issue has been fixed. Cheers, Christian On Mon, Jan 23, 2017 at 9:31 AM, Marco Lettere <m.lett...@gmail.com> wrote: Hello all, this morning just stumbled into this issue and I'm wondering w

[basex-talk] RestXQ returning JSON

2017-01-23 Thread Marco Lettere
Hello all, this morning just stumbled into this issue and I'm wondering whether it could be somehow smoothed up ... I have the following RestXQ function: declare %rest:path("/f") %rest:GET %output:method("json") function a:f() { (:code ...:) }; 1) Replacing comment with the

Re: [basex-talk] XML Prague Meeting... Postponed

2017-01-04 Thread Marco Lettere
Hi Christian, sad news but happy to hear that BaseX team is working hard on its superior product! Keep going with the great work and we're eagerly looking forward to 8.6! All the best to you and the rest of the team, Marco. On 04/01/2017 16:30, Christian Grün wrote: Dear all, This year,

Re: [basex-talk] Exporting large table from RDBMS

2016-11-14 Thread Marco Lettere
Hi all, back with some results We have been able to stream the data from mysql into a string representation of the expected CSV rewriting the functions like this: declare function j:csv-export($table as xs:string) { let $connection := sql:connect(conf:get("jdbc.url"),

Re: [basex-talk] Exporting large table from RDBMS

2016-11-11 Thread Marco Lettere
f BaseX could be used for such tasks. Strengthening its potential role as a data integration engine. Kind regards, Hans Marco Lettere <m.lett...@gmail.com> schrieb am 10:57 Freitag, 11.November 2016: Hi all, I'm currently facing the issue of exporting a large table stored in a MySQL in

[basex-talk] Exporting large table from RDBMS

2016-11-11 Thread Marco Lettere
Hi all, I'm currently facing the issue of exporting a large table stored in a MySQL instance to a csv that has then to be zipped and served through a web service. I'd love to use XQuery and the Basex functionality for doing it because it feels perfectly natural. The problem is that the

Re: [basex-talk] Web sockets and BaseX

2016-10-31 Thread Marco Lettere
Hi France, I can confirm that for using websocket you'll have to write some Java code. That's what we've done for creating a Jetty Connector that is able to accept websocket connections from HTML5 apps running inside browsers. Then we interact from inside XQuery by using the mechanism of Java

[basex-talk] Compiler issue?

2016-10-17 Thread Marco Lettere
Dear BaseX team, running the following two queries [1,2] (which should be semantically equivalent to my eyes) I get different results. In particular [2] sometimes return multiple results or empty sequence which is pretty odd, isn't it? I've tried on 8.5.3 and on a recent snapshot labeled

Re: [basex-talk] 8.5.3 and xquery:invoke ...

2016-09-03 Thread Marco Lettere
sex-talk-boun...@mailman.uni-konstanz.de] On Behalf Of Marco Lettere Sent: Wednesday, August 31, 2016 12:53 PM To: BaseX <basex-talk@mailman.uni-konstanz.de> Subject: [basex-talk] 8.5.3 and xquery:invoke ... Hello again, at the end I managed to reproduce the issue we are currently facing wi

[basex-talk] 8.5.3 and xquery:invoke ...

2016-08-31 Thread Marco Lettere
Hello again, at the end I managed to reproduce the issue we are currently facing with xquery:invoke in 8.5.3 (and also in latest snapshot). Please consider the three queries [1,2,3]. The store [2] into a subdirectory src of the directory containing [1] and store [3] into a directory src2 of

[basex-talk] Problems with 8.5.3

2016-08-31 Thread Marco Lettere
Hi all, after passing to 8.5.3 we have several points in our current application that stop working. The first one refers to the use of sql module. The following query worked neatly in previous version 8.5.1 beta let $init := sql:init("com.mysql.jdbc.Driver") let $connection :=

Re: [basex-talk] Using BaseXServer and BaseXHTTP at the same time?

2016-08-18 Thread Marco Lettere
Yes! Nice isn't it? M. Il 18 ago 2016 11:10 PM, "Kendall Shaw" ha scritto: > Hi, > > > > Does the fact that basexhttp starts servers on 1984 and 8984 mean that I > can have one program using client/server and another using rest using the > same databases at the same

Re: [basex-talk] Uploading a binary file through RestXQ

2016-08-16 Thread Marco Lettere
Hi Christian, I unzipped a version 8.5.1 I already had on my harddisk and the behaviour is the same. File is uploaded as base64 encoded. So I downloaded a version 8.5.3 and this time it behaves as expected (with and without MIXUPDATES) as the file appears as binary data in the raw folder. I

Re: [basex-talk] Uploading a binary file through RestXQ

2016-08-14 Thread Marco Lettere
Hi Christian, as I told, there's a frontend BaseX that receives requests from an HTML page (on port 9984) and forwards them to another BaseX instance that acts as backend service (port 8984). Up to receiving the Image from the page on the first BaseX and writing it to disk everything is fine for

Re: [basex-talk] Uploading a binary file through RestXQ

2016-08-12 Thread Marco Lettere
Hi Christian, I'm using Basex 8.5.1 and this is a faithful excerpt of the code: module namespace ssce = "urn:ssce"; declare %basex:inline function ssce:upload-impl($name as xs:string, $data as item()){ let $f := file:write-binary("/tmp/" || $name, $data) let $response :=

Re: [basex-talk] Uploading a binary file through RestXQ

2016-08-11 Thread Marco Lettere
Hello Christian, I'm sorry but I've tried to follow your suggestion rewriting the code as let $f := file:write-binary("/tmp/" || $name, $map) let $response := http:send-request( , , $url, $body ) The file that is written to disk is

[basex-talk] Uploading a binary file through RestXQ

2016-08-10 Thread Marco Lettere
Hello all, I'm currently trying to implement a service for uploading Images to a Basex db. There is a frontend service that serves an HTML + Javascript page which receives the upload as an AJAX call from the browser then POSTs the request to the backend service for storing into the db. There

Re: [basex-talk] basex function on db:store

2016-06-23 Thread Marco Lettere
Hi, please have a look at [1]. The database module is rather comprehensive. Regards, Marco. [ 1] http://docs.basex.org/wiki/Database_Module#Helper_Functions Il 24 giu 2016 2:01 AM, "Wang, Genneva" ha scritto: > Hi Basex guru, > > I understand that db:store and db:replace

[basex-talk] RESTXQ and xsd validation strangeness

2016-05-13 Thread Marco Lettere
Dear all, this question triggers a dejavu in my head and I'm pretty sure this has been discussed some time ago so I'm not sure why it strikes back at us ... With the latest snapshot (but with 8.4.4 it's the same) downloaded just few minutes ago I start the basehttp server. Then I add the

Re: [basex-talk] dba lags on replace resource

2016-05-11 Thread Marco Lettere
Cheers Dirk On 05/11/2016 02:42 PM, Marco Lettere wrote: Hi all, I have a single resource in a db. I perform several replace operations on that resource. The dba interface shows an increasing number of resources available in the db according to the number of replace operations perform

Re: [basex-talk] Web application static files

2016-05-06 Thread Marco Lettere
@Christian I'm so sorry. I don't know how this sneaked into the code and especially how I could overlook it for two hours this morning. Maybe because of Friday ... Of course it works as it should. Thanks. @Felix Yes your pattern sounds meaningful and I often used the approach. Nowadays I'm

Re: [basex-talk] Web application static files

2016-05-06 Thread Marco Lettere
Hi Christian, I tried the approach of serving static web resources from RestXQ. First I encountered a problem related to my js files being served to the browser as b64 encoded and the browser isn't able to interpret the script. So I modified the code in order to recognize text resources and

Re: [basex-talk] RESTXQ and Website-Building (search-form)

2016-04-12 Thread Marco Lettere
.xqm? - What kind if form-action is necessary to get from /search to /results? I tried different things, but didn’t succeed. Perhaps you have an advice? Thanks in advance. Herzlich gegruesst, Günter Am 10.04.2016 um 22:36 schrieb Marco Lettere <m.lett...@gmail.com>: Hi Günter, sorry for the

Re: [basex-talk] RESTXQ and Website-Building (search-form)

2016-04-12 Thread Marco Lettere
form-action is necessary to get from /search to /results? I tried different things, but didn’t succeed. Perhaps you have an advice? Thanks in advance. Herzlich gegruesst, Günter Am 10.04.2016 um 22:36 schrieb Marco Lettere <m.lett...@gmail.com>: Hi Günter, sorry for the delay but here

Re: [basex-talk] RESTXQ and Website-Building (search-form)

2016-04-11 Thread Marco Lettere
to results.xqm? - What kind if form-action is necessary to get from /search to /results? I tried different things, but didn’t succeed. Perhaps you have an advice? Thanks in advance. Herzlich gegruesst, Günter Am 10.04.2016 um 22:36 schrieb Marco Lettere <m.lett...@gmail.com>: Hi Günter,

Re: [basex-talk] RESTXQ and Website-Building

2016-04-08 Thread Marco Lettere
Hi Günter, we have worked on several web applications that include a frontend and we are very happy with using basex for serving both static (scripts, css, images) and dynamic (markup) content. One pattern that we've used often and that we find very productive is to split markup content into

Re: [basex-talk] Async Module

2016-03-01 Thread Marco Lettere
Huge news!!! I'll throw away my code for doing this. Unless someone wants to have a look at it! :D :D :D Thank you guys. Regards, Marco. On 01/03/2016 17:09, Christian Grün wrote: Hi everyone, As some of you know, James Wright has presented his excellent work on the Promise Module in Prague

Re: [basex-talk] Invalid certs

2016-02-15 Thread Marco Lettere
r, I guess, is no. As IGNORECERT is a global option, it will only be parsed when BaseX is initialized. Cheers from Prague, Christian On Thu, Feb 11, 2016 at 2:09 PM, Marco Lettere <marco.lett...@dedalus.eu> wrote: Hi all, sorry for this maybe dumb question. Thanks, Marco.

[basex-talk] Invalid certs

2016-02-11 Thread Marco Lettere
Hi all, sorry for this maybe dumb question. Is it possible to declare the IGNORECERT option inside a XQuery script that will be executed from inside a Java? Thanks, Marco.

[basex-talk] XProc 2 ...

2016-02-05 Thread Marco Lettere
Hi all, sorry for the small OT but this sounds really interesting: http://lists.xml.org/archives/xml-dev/201602/msg1.html Another reason why I should have been there ... :-(. Anyone from the BaseX community planning to look into it? Ciao, M.

Re: [basex-talk] XML Prague » User Meeting » Feb 11, 2016 » Join us!

2016-01-21 Thread Marco Lettere
Oh, wow! Not able to join this year ... I'll be missing you! The presentation titles are awesome! Definetely looking forward to watch the recordings! Have a nice XML Prague! M. On 19/01/2016 22:52, Christian Grün wrote: Hi everyone, Once again, I would like to remind you of our BaseX User

Re: [basex-talk] Strange behaviour on db:add inside restxq

2016-01-11 Thread Marco Lettere
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 Lettere <marc

<    1   2   3   4   >