[xml] xpath and the document order


  as I understand, the function "xmlXPathEvalExpression" doesn't have to
return nodes in the document order. So here are questions.

1) Could you show an example of XML and XPath, for which
   "xmlXPathEvalExpression" returns nodes not in the document order?

2) What should be used for sorting a set of nodes:

"xmlXPathNodeSetSort" from "xpath.c" from libxml2, or
"xsltDocumentSortFunction" from "xsltutils.c" from libxslt?

  The only difference I found is a sort algorithm (Shell's sort vs
bubble (?) sort).


Oleg Paraschenko  olpa@ http://xmlhack.ru/  XML news in Russian
http://uucode.com/blog/  Generative Programming, XML, TeX, Scheme

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]