|
>Home>Learn XQuery> XQuery Tips and Tricks>Collection Function Order
Print
In what order does fn:collection() return documents?
In DataDirect XQuery™, the order of documents returned by the fn:collection() depends on which function options you specify to fetch documents from folders. If you don't select any "sort" options (collection("file:///c:/books?select=*.xml"), for example), the order in which documents are returned is not guaranteed; if you use any "sort" option, is specified (collection("file:///c:/books?select=*.xml";sort=a), for example), then documents are returned in the requested order.
Next Question!
What is a context item type? And how do I set it?
|