Re: [basex-talk] filtering NaN from a sequence

2020-02-02 Thread Martin Honnen
Am 03.02.2020 um 01:22 schrieb Graydon Saunders: for $value in $xmlReport/csv/record/Payment_Amount/number()   where ???   return $value Can you live with for $value in $xmlReport/csv/record/Payment_Amount   where $value castable as xs:double   return xs:double($value) ?

[basex-talk] convert JSON to XML to add to database

2020-02-02 Thread thufir
Hi all, How is JSON converted to XML in order to ADD to a database? JSONObject jsonTweet = tweets.getJSONObject(Long.toString(id)); xmlStringTweet = XML.toString(jsonTweet); alternately, could the JSON simply get directly added to the database? see also: https://stackoverflo

Re: [basex-talk] filtering NaN from a sequence

2020-02-02 Thread Graydon Saunders
Hi Bridger functx:is-a-number does indeed work, but it's guts are string(number($value)) != 'NaN' Which seems improper somehow; it's relying on knowing the string that corresponding to the conceptual NaN result. I may be looking for more elegance than I can plausibly expect, here. :) Thanks! G

Re: [basex-talk] filtering NaN from a sequence

2020-02-02 Thread Bridger Dyson-Smith
Hi Graydon, I'm mobile at the moment, so please excuse the abbreviated reply. Would functx:is-a-number() [#1] work in your where clause? I'm completely unable to test... apologies. Best, Bridger #1 http://www.xqueryfunctions.com/xq/functx_is-a-number.html On Sun, Feb 2, 2020, 7:22 PM Graydon Sa

[basex-talk] filtering NaN from a sequence

2020-02-02 Thread Graydon Saunders
Hello all -- So I have a CSV file, and I can pull that into BaseX in the hopes of writing a query to extract a report. I'm using 9.3.1 for the purpose. Not all of the Payment_Amount fields have a value, so any report-extracting query has to filter those out of any calculations or the whole thing