Re: [basex-talk] Question concerning querying cyclic network xml-structure.

2012-07-17 Thread Rob
Hi Huib, Thanx for the reply. I’ve seen this kind of solution before on the internet but this does not work in my case. I don’t have a single @ref-attribute in $node-element. Instead I have several ref-child-elements within a $node-element. (that is what a meant with linear versus iter

Re: [basex-talk] Question concerning querying cyclic network xml-structure.

2012-07-17 Thread Huib Verweij
Hi Rob, I think XQuery and XSLT are very much capable of handling your example. If I understand it correctly, I do not know what linear or iterative recursion is. In fact I programmed something similar to the algorithm you describe in XQuery recently. I was processing nodes from the BaseX datab

Re: [basex-talk] Counting groups

2012-07-17 Thread Pascal Heus
Thanks Michael. I ended up with something similar :-) best *P On 7/17/12 9:10 AM, Michael Seiferle wrote: > Hi Pascal, > > maybe you already tried that; but: > > let $somethings := for $varGrp at $pos in local:getVariables($from,$to) > group by $name := string($varGrp/@name) > return > for

Re: [basex-talk] Counting groups

2012-07-17 Thread Michael Seiferle
Hi Pascal, maybe you already tried that; but: let $somethings := for $varGrp at $pos in local:getVariables($from,$to) group by $name := string($varGrp/@name) return for $something at $pos in $somethings return... Hope this helps, this is the best I can think of at the moment :) Kind rega

[basex-talk] Question concerning querying cyclic network xml-structure.

2012-07-17 Thread Rob
Hi, Can you please help me solving a challenge I have with a specific type XML-query? I’ve a bunch of XML-files that are referencing each other. So, a XML-file can reference to multiple XML-files and a XML-file can be referenced to by multiple XML-files. This whole reference-structure cou

[basex-talk] Counting groups

2012-07-17 Thread Pascal Heus
All: In a group by query expression like for $varGrp at $pos in local:getVariables($from,$to) group by $name := string($varGrp/@name) return is there any way to get a value or position for the group count? In my particular use case, I used this to generate an HTML table and I would like to

Re: [basex-talk] Single restxq call, multiple db:replace. Second one always fail, but the error message seems unrelated.

2012-07-17 Thread M. van Keulen
Hi, Not that I tested or tried it, but it seems to me to be a matter operator priorities, hence of brackets around both db:replace functions: ( db:replace(...) , db:replace(...) ). Otherwise the XQuery parser will parse it as updating function ... { ( let ... for ... let ... let ..