Re: [basex-talk] Fwd: basic JSON problem

2015-11-10 Thread Florent Gallaire
s="http://www.w3.org/2005/xpath-functions";>JSON) >>> >>> ...versus... >>> >>> xml-to-json(JSON) >>> >>> [1] http://docs.basex.org/wiki/Json_Module >>> [2] http://docs.basex.org/wiki/XQuery_3.1#fn:json-to-xml >>>

[basex-talk] Fwd: basic JSON problem

2015-11-09 Thread Florent Gallaire
; ...versus... > > xml-to-json(JSON) > > [1] http://docs.basex.org/wiki/Json_Module > [2] http://docs.basex.org/wiki/XQuery_3.1#fn:json-to-xml > > > On Mon, Nov 9, 2015 at 4:19 AM, Florent Gallaire wrote: >> I would like to use the new "basic" JSON via REST. >&

[basex-talk] basic JSON problem

2015-11-08 Thread Florent Gallaire
I would like to use the new "basic" JSON via REST. With basex 8.3.1 and 8.3.2beta, my_request&method=json&json=format=jsonml works fine, but my_request&method=json&json=format=basic returns : [FOJS0006] Element 'article' has invalid namespace: ''. What's the problem ? Best regards Florent -- F

Re: [basex-talk] xquery of attributes

2015-05-07 Thread Florent Gallaire
orent > Cheers > Dirk > On 05/07/2015 03:38 AM, Florent Gallaire wrote: >> I answer to myself : >> db:open('factbook')//city/@name/string() >> will works fine. >> >> Still, is there a best way ? Is there some problems with that ? Is the >> ele

Re: [basex-talk] xquery of attributes

2015-05-06 Thread Florent Gallaire
I answer to myself : db:open('factbook')//city/@name/string() will works fine. Still, is there a best way ? Is there some problems with that ? Is the element way better for xquery web usage ? Cheers Florent On Thu, May 7, 2015 at 2:18 AM, Florent Gallaire wrote: > In the RESTXQ

[basex-talk] xquery of attributes

2015-05-06 Thread Florent Gallaire
In the RESTXQ documentation there is this example which works fine : declare %rest:path("cities") %output:method("json") %output:json("format=jsonml") function page:cities() { element cities { db:open('factbook')//city/name } }; If I have the same factbook db but with name as attr

Re: [basex-talk] The JSON serialization controversy

2015-01-12 Thread Florent Gallaire
hristian Grün wrote: > I'm not sure yet. Does it work for you do far? > > Am 10.01.2015 02:25 schrieb "Florent Gallaire" : > >> Thanks a lot for your work Chrisitian. >> Will the code be merged in the master ? >> >> >> Best regards >> >>

Re: [basex-talk] The JSON serialization controversy

2015-01-09 Thread Florent Gallaire
Thanks a lot for your work Chrisitian. Will the code be merged in the master ? Best regards Florent On Tue, Jan 6, 2015 at 9:29 PM, Christian Grün wrote: > Hi Florent, > >> b) We motivate users to write their own JSON serializers in XQuery... > > As I failed miserably in my attempt to motivate

Re: [basex-talk] The JSON serialization controversy

2015-01-05 Thread Florent Gallaire
ake a look at our documentation at > http://docs.basex.org/wiki/JSON to see what is available. We agree that > JsonML isn't the most convenient format, that's why the BaseX-specific direct > format is the default one. > > Cheers, > Dirk > > On 01/05

[basex-talk] The JSON serialization controversy

2015-01-04 Thread Florent Gallaire
Whether my database this XML file: iatrogène gène hippiatre hippo The only easy way to have JSON serialization with BaseX is to use the "format=jsonml" option which returns: ["mots", ["mot", ["nom", "iatrogène"], ["racine", "gène"]], ["mot",

Re: [basex-talk] Out Of Memory

2014-12-30 Thread Florent Gallaire
For my uses, "string()" seems to be extremely extremely slow at processing big data, you should try without it. Best regards Florent On Tue, Dec 30, 2014 at 2:38 PM, Mansi Sheth wrote: > Hello, > > Wanted to get back to this email chain and share my experience. > > I got this running beautiful

Re: [basex-talk] Performance and benchmark

2014-12-29 Thread Florent Gallaire
query have poor performances with a huge number of files in the database, what seems fair to me since BaseX is optimized for XMLish uses. Best regards Florent On Thu, Dec 18, 2014 at 4:50 PM, Florent Gallaire wrote: > On Thu, Dec 18, 2014 at 3:35 PM, Pascal Heus wrote: > >>We run

Re: [basex-talk] element or attribute

2014-12-29 Thread Florent Gallaire
le name, ... separately). > > From the database perspektive, there is not difference in speed whether you > use an attribute or an element. So only the model of your data should be > relevant to your schema. > > Cheers, > Dirk > On 12/27/2014 07:23 PM, Florent Gallaire wr

[basex-talk] element or attribute

2014-12-27 Thread Florent Gallaire
Hello, When creating a XML file for usage as database with BaseX, is there some policy about when it's good to use an element and when it's good to use an attribut ? Cheers, Florent -- FLOSS Engineer & Lawyer

Re: [basex-talk] Need help to query

2014-12-23 Thread Florent Gallaire
t. Do you encouter >> any problems with this approach? As a general note you most likely always >> want to avoid having descendant-or-self steps (i.e. //), as it has to search >> the whole XML (sub)tree. So being as specific as possible in giving the path >> is always a go

Re: [basex-talk] Need help to query

2014-12-23 Thread Florent Gallaire
The value of the element is different in each file. On Tue, Dec 23, 2014 at 6:14 PM, Florent Gallaire wrote: > Hello, I need some help to query a database of thousands of xml files. > They are structured only with elements with no attributes : > > file1.xml > &

[basex-talk] Need help to query

2014-12-23 Thread Florent Gallaire
Hello, I need some help to query a database of thousands of xml files. They are structured only with elements with no attributes : file1.xml value text file2.xml value text and so on file3.xml, file4.xml Having the value of the element, I would l

Re: [basex-talk] Performance and benchmark

2014-12-18 Thread Florent Gallaire
On Thu, Dec 18, 2014 at 3:35 PM, Pascal Heus wrote: >We run BaseX on EC2 micro and small instances without significant issue >(though AWS servers, particularly micro/small, are not known >for their high >performance). Have you tried on a different instance type? Not sure how >heavily loaded yo

Re: [basex-talk] Performance and benchmark

2014-12-18 Thread Florent Gallaire
database size | shared CentOS| t2.micro EC2 CoreOS 2.4 Go| 1.5 sec 160% CPU | 30 sec3% CPU ??!! 254 Mo| 0.35 sec 35% CPU | 0.21 sec 30% CPU 224 Ko| 0.24 sec 2% CPU | 0.14 sec 3% CPU The CPU usage on the t2.micro is not what it should be for the 2.4Go database and

Re: [basex-talk] Performance and benchmark

2014-12-18 Thread Florent Gallaire
On Thu, Dec 18, 2014 at 2:14 AM, Christian Grün wrote: >> 4) With my database, on a t2.micro EC2 instance (1 VCPU + 1 Go RAM), >> BaseX is unusable. > > That's a good hint. What does "unusable" mean? Did you encounter > problems to create the database, or are your queries running out of > memory?

[basex-talk] Performance and benchmark

2014-12-17 Thread Florent Gallaire
Hello, I have evaluated XML databases for an important project, and I'm very happy with BaseX which has great fonctionnalities and is very easy to use. I'm now about deploying my project in production, so I have new questions. My database has 400 000 XML resource files for a total 2.4 Go size, so

Re: [basex-talk] Query database paths using REST

2014-11-24 Thread Florent Gallaire
rsion did you use? > > Cheers, > Dirk > > On 11/24/2014 09:12 AM, Florent Gallaire wrote: >> Same question: >> http://stackoverflow.com/questions/22676574/why-cant-you-query-database-paths-files-using-rest >> >> /rest/xml/path/test.xml returns the content of th

[basex-talk] Query database paths using REST

2014-11-24 Thread Florent Gallaire
Same question: http://stackoverflow.com/questions/22676574/why-cant-you-query-database-paths-files-using-rest /rest/xml/path/test.xml returns the content of the XML file, but if you try a query like: /rest/xml/path/test.xml?query=//element you have the error: [BXDB0005] Query must yield database n

Re: [basex-talk] JSON serialization via REST API

2014-04-08 Thread Florent Gallaire
> You will never be able to do a totally automatical lossless JSON<>XML > conversion. However, you are able to write your own mapping functions > which are useful for your specific use case OK. > I don't really get your argument here. RestXQ enables you to build a > REST interface and you can in

Re: [basex-talk] JSON serialization via REST API

2014-04-07 Thread Florent Gallaire
ns like indent=no : http://localhost:8984/rest/factbook?query=//city/name&wrap=yes&method=json&json=format=jsonml,indent=no Maybe a shortcut method=jsonml could be back for simplicity ? And add an example to the wiki ^^ Florent > Cheers > > Florent > >> Cheers &

Re: [basex-talk] JSON serialization via REST API

2014-04-07 Thread Florent Gallaire
Because there is the new options argument...it's more complex but ok if knew how to use it with REST API, please help me ^^ : http://localhost:8984/rest/factbook?query=//city/name&wrap=yes&method=json&options=?? Cheers Florent > Cheers > > Florent > > >> On 0

[basex-talk] JSON serialization via REST API

2014-04-07 Thread Florent Gallaire
Hello, I'm new in the XML databases world, evaluating BaseX and eXist-db for a new project. BaseX seems really clean and lightweight. I would like to use it via the REST API and with a json output. I test with the factbook.xml example database and the method parameter set to "json" : http://loc