[basex-talk] csv-parser
Hi all When importing CSV files, it seems that BaseX is parsing fields for balanced bracketing and quotes (a single quote or bracket causes trouble). Is it possible to turn that off, so that files are processed based only on delimiter? I couldn't find any information in the documentation. All the best, Lars ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] csv-parser
Hi Lars, When importing CSV files, it seems that BaseX is parsing fields for balanced bracketing and quotes (a single quote or bracket causes trouble). Is it possible to turn that off, so that files are processed based only on delimiter? I couldn't find any information in the documentation. I’ve just added such an option to BaseX. Could you please give us some feedback if it does what you expect? Thanks, Christian [1] http://docs.basex.org/wiki/CSV_Module#Options [2] http://files.basex.org/releases/latest/ ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
[basex-talk] some questions over the profile module
Hello Christian, I have some small questions over the profile module. 1) The following code declare function local:sequence($nb){for $i in 1 to xs:integer($nb) return $i}; prof:time(fn:count(local:sequence(100))) return 4.94 ms. It means that you lazy evaluate the query {for $i in 1 to xs:integer($nb) return $i ? (I recall that you already mentioned this point that but I would like a confirmation, since it might be a profiler issue) 2) It seems that you somehow call the fn:trace function in the profile module. Is there a way to catch the returned values of these functions ? The motivation is for profiling purposes. To be more specific, I would like to treat the output results as output @function = my_function{prof:time( xquery ) }/output to be able to aggregate results at a higher level of call, i.e. something like for $output in $prof//output let $fun := data($output/@function) group by $fun return element-name{$fun}{sum(data($output) ) } Thanks Jean-Marc ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
[basex-talk] BaseX Failing After a Number of Requests
Hi Guys, We have implemented BaseX to provide a REST API to access specific information out of the database. Databases range in size from hundreds to 6000+ XML files, and the APIs use the attribute index to quickly locate nodes and return information about them. We have been noticing that BaseX has been randomly failing after a number of requests in the range of several hundred. I can replicate the failure in a few minutes by looping curl requests from the command line. The failure is made apparent by a valid request returning a Jetty 404 Error: HTTP ERROR 404 Problem accessing { redacted URL }. Reason: No function found that matches the request. -- *Powered by Jetty://* This message is the same message that is thrown when requesting a URL that does not have a matching path, but this request is valid, and has been used before. It appears that the issue is the BaseX server failing somehow, but I can't track the reason. No information is logged at the time of the crash. If I connect to the BaseX server (on port 1984) using the basexclient, it connects, but reports that there are no databases available. Once I restart the service, I can reconnect, and it lists all databases as it should. Any ideas what might be causing these issues? Thanks, Jeremy ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] csv-parser
Fabulous, that fixed it! The lines with a single quote in them are fine, as well as those with a single left parenthesis (. The data come from a SQL database with human entered data in freetext fields, so things aren't always in balance. The new file browser with the editor is nice too! Best, Lars 2013/12/4 Christian Grün christian.gr...@gmail.com Hi Lars, When importing CSV files, it seems that BaseX is parsing fields for balanced bracketing and quotes (a single quote or bracket causes trouble). Is it possible to turn that off, so that files are processed based only on delimiter? I couldn't find any information in the documentation. I’ve just added such an option to BaseX. Could you please give us some feedback if it does what you expect? Thanks, Christian [1] http://docs.basex.org/wiki/CSV_Module#Options [2] http://files.basex.org/releases/latest/ ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
[basex-talk] Serializing unescaped xml to string
Hi all, Is there a way to output unescaped XML to a string for debugging purposes? In unittests we would like to output the XML returned when a test fails, here is my example: declare %unit:test function elementinfo-test:test-element-info() { let $cases := cases case commentFailed input/comment inputinput/input output result output /result /output /case /cases for $case in $cases/case let $result := {some function which returns XML} let $u := unit:assert(deep-equal($case/output, result), $case/comment/text() || Input: || $case/input/text() || Expected: || fn:serialize($case/output) || Got: || fn:serialize($result)) return $u }; But when a test fails, I get escaped XML as the output. Is there any way to get this as actual XML? Thanks, Joe ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] Serializing unescaped xml to string
On Wed, 2013-12-04 at 19:59 -0800, Joe Templeman wrote: Hi all, Is there a way to output unescaped XML to a string for debugging purposes? In unittests we would like to output the XML returned when a test fails, here is my example: [...] || Got: || fn:serialize($result)) return $u }; But when a test fails, I get escaped XML as the output. Is there any way to get this as actual XML? ( Input: , $case/input/text(), Expected: , $case/output, Got:, $result) || Got: || as a sequence... Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk