Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Menashè Eliezer
Thank you for the helpful ideas! With kind regards, Menashè On 07/14/2015 12:56 PM, Christian Grün wrote: What about this? let $nodes := let $db := db:open("CDI") for $x in $db let $beginPosition := $x//startTime let $lon := xs:float($x//longitudine) let $lat := xs:float($x//lat

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Christian Grün
What about this? let $nodes := let $db := db:open("CDI") for $x in $db let $beginPosition := $x//startTime let $lon := xs:float($x//longitudine) let $lat := xs:float($x//latitudine) where $beginPosition>="1889-01-01" and $beginPosition<="2015-07-10" and $lat<=46.733 and $lat>=-6

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Menashè Eliezer
I'm sorry, but it's not clear how $nodes can include the result of my main query: xquery version "3.0"; declare option output:item-separator ","; let $db := db:open("CDI") for $x in $db let $beginPosition := $x//startTime let $lon := xs:float($x//longitudine) let $lat := xs:flo

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Christian Grün
E.g. like that: let $count := function($nodes) { count($nodes) } let $nodes := (, ) return $count($nodes) On Tue, Jul 14, 2015 at 12:41 PM, Menashè Eliezer wrote: > Thank you, but would you please show me how to pass (only once) for each > function the xml sequence which results from my

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Menashè Eliezer
Thank you, but would you please show me how to pass (only once) for each function the xml sequence which results from my main query, instead of simple numbers as in your example? With kind regards, Menashè On 07/14/2015 12:30 PM, Christian Grün wrote: I hope it's clear. Sorry, I'm still conf

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Christian Grün
> I hope it's clear. Sorry, I'm still confuzzled. What is the problem? I guess you want to define different, exchangable reporting functions for more or less the same input (dataType, device, ...)? Here is one way to define functions and call them in a second step: let $add := function($a, $b)

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Menashè Eliezer
Hi, The initial of the code should be modified, so here is only the essence of one of the pivoting reports: for $singleDataType in $dataType for $singleDevice in $device for $singleAvailability in $availability for $singleCountry in $country for $singleParameter in $parameter group by $si

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Christian Grün
> I mean a sequence of XML nodes resulting from a 'for' loop. Then there are > queries that for the same filters (or with a single extra condition) return > different xml results. > For example: "group by" and time distribution table per year and month. Well, I'll just say it's possible ;) Feel fr

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Menashè Eliezer
Hi Christian, On 07/14/2015 09:30 AM, Christian Grün wrote: What about the reporting function, does it already exist? What is a subset: Is it a sequence of XML nodes resulting from a path expression? Could you possibly provide us with some code you have written so far? Christian I mean a seque

Re: [basex-talk] Reporting function for a subset

2015-07-14 Thread Christian Grün
Hi Menashè, > Is it possible? Yes, it should be, because you can do nearly everything in XQuery.. However, I must confess I have no idea how to help you right now.. What about the reporting function, does it already exist? What is a subset: Is it a sequence of XML nodes resulting from a path expr

[basex-talk] Reporting function for a subset

2015-07-13 Thread Menashè Eliezer
Hello, I want to call a reporting function with a subset of documents created inside a loop which will return a xml report. I couldn't find information how and if can it be done. The idea is that there is a main query which results in a subset. Then I want to make different processing only on t