Re: [Chicken-users] sxpath does not preserve node order

2014-12-05 Thread Jörg F. Wittenberger
Am 04.12.2014 um 21:25 schrieb Sascha Ziemann: It seems to me that the use of //* duplicates the inner 'a' node: That's not what it does. I'm not completely sure that XPath does require this behavior, but I tend to believe this is the right thing to do. // is supposed to yield all descendant

Re: [Chicken-users] sxpath does not preserve node order

2014-12-05 Thread Sascha Ziemann
At Fri, 05 Dec 2014 11:55:39 +0100, Jörg F. Wittenberger wrote: Am 04.12.2014 um 21:25 schrieb Sascha Ziemann: It seems to me that the use of //* duplicates the inner 'a' node: That's not what it does. I'm not completely sure that XPath does require this behavior, but I tend to believe

[Chicken-users] sxpath does not preserve node order

2014-12-04 Thread Sascha Ziemann
Hi, I have a problem with Sxpath not preserving the node order. This example: (use regex) (use http-client) (use sxpath) (use html-parser) ((sxpath //h1[@class='header']//*/text()) (with-input-from-request http://www.imdb.com/title/tt0497465/; #f html-sxml)) returns

Re: [Chicken-users] sxpath does not preserve node order

2014-12-04 Thread Sascha Ziemann
It seems to me that the use of //* duplicates the inner 'a' node: (begin (newline) (pp ((sxpath //h1[@class='header']//*) (with-input-from-request http://www.imdb.com/title/tt0497465/; #f html-sxml prints ((span (@ (class itemprop) (itemprop name)) Vicky Cristina

Re: [Chicken-users] sxpath does not preserve node order

2014-12-04 Thread Peter Bex
On Thu, Dec 04, 2014 at 09:25:38PM +0100, Sascha Ziemann wrote: It seems to me that the use of //* duplicates the inner 'a' node: (begin (newline) (pp ((sxpath //h1[@class='header']//*) (with-input-from-request http://www.imdb.com/title/tt0497465/; #f html-sxml

Re: [Chicken-users] sxpath does not preserve node order

2014-12-04 Thread Andy Bennett
Hi Sascha, ((sxpath //h1[@class='header']//*/text()) (with-input-from-request http://www.imdb.com/title/tt0497465/; #f html-sxml)) This isn't a fix for your problem: it's a plug for my egg, rest-bind, which might be useful to you if you're binding a lot of HTTP APIs like this.