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

  ("Vicky Cristina Barcelona" "(" ")" "2008")

But the correct node order would be

  ("Vicky Cristina Barcelona" "(" "2008" ")")

If I try the same in Firebug the order is correct:

  $x("//h1[@class='header']//*/text()")
  [<TextNode textContent="Vicky Cristina Barcelona">,
   <TextNode textContent="(">,
   <TextNode textContent="2008">,
   <TextNode textContent=")">]

Is this a bug? Or is the node order unspecified?

Regards,
Sascha

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to