Re: [basex-talk] rest:response and status 400/404

2014-04-16 Thread Marco Lettere
Hi Dirk, 8.2. I'll try the latest. Thanks, M. On 04/15/2014 08:13 PM, Dirk Kirsten wrote: Hi Marco, what BaseX version are you using? Did you try with the latest snapshot? Cheers, Dirk On 15/04/14 13:48, Marco Lettere wrote: Hi Dirk, this is the output I get when using curl (same as Poster

Re: [basex-talk] Full text score with or

2014-04-16 Thread Andy Bunce
Hi Christian, Thanks, that works for me. I always prefer less complex code :-) so it would be nice if this feature made a return at some point. Regards /Andy On Fri, Apr 11, 2014 at 12:04 PM, Christian Grün wrote: > Hi Andy, > > as we haven't managed so far to formalize scoring propagation for

Re: [basex-talk] rest:response and status 400/404

2014-04-16 Thread Marco Lettere
Hello again, of course I meant 7.8.2 and not 8.2 :-(. In the meanwhile I've discovered that when I override the rest:response with any status different from 20X, I always get the body as text/plain even if it's XML. Example code for a 500 response with a SOAP fault element: local:errorHTTP($m

[basex-talk] Order of nodes in reversed axes

2014-04-16 Thread José Tomás Atria
Hello all, I've been looking for an authoritative answer to this, but have been unable to find one. I'm trying to reliably get the nearest ancestor of a node. ie with this test data: let $test := element test { attribute id { 4 }, element test { attribute id { 3 }, element test {

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread David Rudel
Mr. Atria, You left out a key element from the answer you got from stack overflow. Note that Dimitre's response used a filter expression (path expression) [predicate] not a simple path expression The ()s are critical. $test//child/ancestor-or-self::test[ last() ] is very different from ($test

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread David Rudel
More specifically, I don't understand what the difference is between "nearest ancestor element" and "parent." On Wed, Apr 16, 2014 at 8:45 PM, David Rudel wrote: > Mr. Atria, > You left out a key element from the answer you got from stack overflow. > > Note that Dimitre's response used a filter

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread José Tomás Atria
Thank you all for your answers. I was just tryig to determine if $test/ancestor::element()[1] would be the correct way of getting the nearest ancestor, as I couldn't find whether axes were ordered or not in the xpath specification. Thanks! ps: Parent doesn't apply, because the relevant node is n

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread David Rudel
I apologize if I'm being dense, but I don't understand how the nearest ancestor can be anything other than the parent. Could you please give an example? I just want to make sure I haven't sent you off with the wrong expression for your intended usage. On Wed, Apr 16, 2014 at 8:48 PM, José Tomás A

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread José Tomás Atria
let $test := element div0{ attribute id { 4 }, element div1 { attribute id { 3 }, element div1 { attribute id { 2 }, element para { attribute id { 1 }, element child { } } } } } I want to get the "smallest" div1 for a given child. this is, the e

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread José Tomás Atria
That should have been ancestor::div1[1]. pardon the typo. On Wed, Apr 16, 2014 at 3:21 PM, José Tomás Atria wrote: > let $test := > element div0{ > attribute id { 4 }, > element div1 { > attribute id { 3 }, > element div1 { > attribute id { 2 }, > element para { >

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread David Rudel
Ah, okay. I didn't catch that you wanted "the nearest ancestor with a particular name." In that case then I think you are golden. If there is a chance that the element itself is a div1 element, then you will want to use ancestor-or-self instead, but otherwise I think you have it right. On Wed, Apr

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread José Tomás Atria
Just for the sake of completion, the authoritative answer is here : "The proximity position of a member of a node-set with respect to an axis is defined to be the position of the node in the node-set ordered in document order if the axis is a forward axis and

Re: [basex-talk] Order of nodes in reversed axes

2014-04-16 Thread Liam R E Quin
On Wed, 2014-04-16 at 15:59 -0400, José Tomás Atria wrote: > Just for the sake of completion, the authoritative answer is > here Erm, http://www.w3.org/TR/xpath-30/#id-predicate is closer - XPath 1.0 is rather old and is not really the basis for XQuery. XQu