However applications, in general, have different requirements on the order issue. By default the element order of the input is preserved. Once again notice that extremely powerful order manipulation mechanisms will compromise type inference and closure under composition. In this case he can specify that the order is nondeterministic thereby leaving room for optimization. The above policies deal with specifying an order for the view.
Similar considerations apply to checking the order of the input elements.
In order to apply similar optimization techniques as those developed for relational databases, an XML query language should have an equivalent algebra. It is desirable to have a language that tackles all tasks required in the mediation process. In this way we can avoid the impedance mismatch caused by using multiple languages and we create extra opportunities for optimization. It has recently been extended to allow navigational recursion in a clean way. It is clear that a mediator system or, in general, any agent that queries this source must conform to the set of supported queries exported by this source.